Goto or not goto? (Was: Re: loops in general)
richard.henderson~
richard at stat.tamu.edu
Mon May 7 19:30:34 AEST 1990
In article <2296 at awdprime.UUCP> cs.utexas.edu!auschs!ibmaus!commlab1.austin.ibm.com!tif writes:
>In article <12866 at ulysses.att.com> ggs at ulysses.att.com (Griff Smith) writes:
> [ Some neat defines and a little state machine deleted ]
After I saw this, I could not help but see what would happen, so I
wrote out a small state machine that matched (ab|c)*d. It turned
out to produce 25% fewer lines of machine code under both cc (88 vs 120)
and gcc (74 vs 98) on a sun3. And this seems right. If I were
to hand code a state machine, it would have spaghetti jumps too.
I cannot see anything wrong with compiling with DEBUG to make
sure that it works, then turning it off.
Especially if it can speed up a simple pattern match on
/usr/dict/words by over 1 second.
>Paul Chamberlain
>tif at doorstop.austin.ibm.com
>tif at commlab1.austin.ibm.com
>sc30661 at ausvm6
richard~
/*
richard at csseq.tamu.edu
richard at stat.tamu.edu
*/
More information about the Comp.lang.c
mailing list