more questions about efficient C code
Mike Schloss
mhs at enmasse.UUCP
Fri Jun 28 06:25:10 AEST 1985
> I am currently modifying C code, written by someone else,
> that is incredibly terse. It's paramount that the code
> be fast, so I presume the code is terse for speed. I'm
> now curious about a few things:
>
> .
> .
> .
Sorry but it all depends on your particular compiler
implementation and the machine you are running on.
There are two ways to find the answers to your questions.
One is to write a simple test program and use the '-S'
flag of the compiler. This will produce assembly code
that you can examine and see what intructions are being
generated for any particular expression. If you dont
want to get your hands dirty with assembler then write
your test program to run a couple 100k times though
each expression and time it.
More information about the Comp.lang.c
mailing list