🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #6724

Re: Common subexpression optimization

#6724
From: Anton Rang
Date: Wed, 14 Feb 1990 16:43
16 lines
1287 bytes
In article <449@quad.uucp> dts@quad.uucp (David T. Sandberg) writes:
>You're right: you don't speak C.  Kristoffer's version is a very
>common way to do operations like this in C.  I've written several
>bits of code nearly identical to that in the last week.

  Of course, if the array is redeclared to a different size, you get
interesting side-effects in the pointer versions, which can be rather
annoying.  For instance, adding a third element to each row (say, to
hold a precomputed function of the other two elements later on) will
screw up every loop like this.

		Anton
   
+---------------------------+------------------+-------------+
| Anton Rang (grad student) | rang@cs.wisc.edu | UW--Madison |
+---------------------------+------------------+-------------+
Technical Details
Message-ID: <RANG.90Feb14104334@derby.cs.wisc.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!snorkelwacker!usc!cs.utexas.edu!uwm.edu!uwvax!rang
References: <14229@lambda.UUCP> <2844@pkmab.se > <767@enea.se> <449@quad.uucp>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!snorkelwacker!usc!cs.utexas.edu!uwm.edu!uwvax!rang
From: rang@cs.wisc.edu (Anton Rang)
Newsgroups: comp.lang.misc
Subject: Re: Common subexpression optimization
Message-ID: <RANG.90Feb14104334@derby.cs.wisc.edu>
Date: 14 Feb 90 16:43:34 GMT
References: <14229@lambda.UUCP> <2844@pkmab.se > <767@enea.se> <449@quad.uucp>
Sender: news@spool.cs.wisc.edu
Organization: UW-Madison CS department
Lines: 16
In-reply-to: dts@quad.uucp's message of 12 Feb 90 23:35:50 GMT