Mail Archives: djgpp/1992/03/13/19:19:38
>I'm using djgpp verion 1.03. In examining the .S output from a C++
>code file, I find an enormous number of (to my mind) useless jmps.
>They jmp over '.align 2,144' statements and even setting optimization
>on does nothing to get rid of them. Are they in fact optimized by the
>assembler, in which case I wouldn't know the difference?
The assembler doesn't do optimizations in gcc.
>I got sidetracked onto this by trying to figure out why my ray tracer
>was so slow compared to those of people using Borland's C++.
Two things make djgpp faster: longs and pointers (vs shorts and far
pointers). Floating point isn't faster (same chip) and code speed
isn't much faster (except for far jumps).
>I would appreciate any pointers, including whether this is improved in
>gcc 2.0 (if the problem exists at all, of course).
>Thanks,
>Pete
Using -O (gcc -S -O foo.cc) gets rid of a lot of that kind of stuff.
I hope 2.0 solves it also; I haven't bothered to check.
1.06 will be out soon, and it will have gcc 2.0 in it.
DJ
dj AT ctron DOT com
Life is a banana.
- Raw text -