Plea for help: The detriment of using Microsoft products
Jerry Feldman
Gerry.Feldman at compaq.com
Wed May 17 09:02:03 EDT 2000
Use caution when trying to hand optimize C code. Today, we generally
have good optimizing compilers, and by trying to play tricks may cause
your program to run slower. As an example, an old C programmer
technique of using pointers to loop through an array forces the compiler
to generate code to dereference the pointer at each iteration. Using
subscripts allows the compiler to optimize the code better. Compilers do
things like pull loop invariants out of loops. And on RISC machines
compilers even analyze the code streams and reorder the instruction
sequences so that the processor can pipeline more efficiently.
On 16 May 2000, at 15:59, George Gallen wrote:
> One thing I have found with C, is that at first, get the
> program running, use simple statements and lots o indenting,
>
> Then once it's running, start modifying it to run faster, by
> trying place multiple operations and using other shortcuts
> which run quicker, make for less code, but make it down right
> obnoxious to debug.
--
Jerry Feldman
Contractor, eInfrastructure Partner Engineering
508-467-4315 http://www.testdrive.compaq.com/linux/
Compaq Computer Corp.
200 Forest Street MRO1-3/F1
Marlboro, Ma. 01752
-
Subcription/unsubscription/info requests: send e-mail with
"subscribe", "unsubscribe", or "info" on the first line of the
message body to discuss-request at blu.org (Subject line is ignored).
More information about the Discuss
mailing list