more questions about efficient C code

Jerry Farrell jfarrell at sun.uucp
Sun Jul 7 14:01:12 AEST 1985


In article <420 at enmasse.UUCP> mhs at enmasse.UUCP (Mike Schloss) writes:
>> 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.

Unfortunately, this option is not likely to show you the
optimized code you would get from running the compiler with
the -O flag.  To really see what's being generated, compile
it, and then look at the object file with something like
foo,24?ai
in adb.



More information about the Comp.lang.c mailing list