Mail Archives: djgpp/2000/07/15/00:18:47
interesting point:
djgpp seems to be a much better compiler than other commercial ones
(for MS-DOS progs anyway)
this is probably because of the way the compiler handles assembly code.
i found this interesting comparison in xaos:
| |
| |
|compiler | options | loops per
second |
|____________|_______________________________________|_________________
|
|pgcc2.7.2p | -O6 -ffast-math -mpentium -frisc | 5 464
480 |
| | -fomit-frame-pointer -funroll-loops
| |
| | -fopt-reg-use -frisc
| |
|egcs970828 | -O3 -ffast-math -mpentium | 5 405
405 |
| | -fomit-frame-pointer -funroll-loops
| |
|egcs970828 | -O3 -ffast-math -m486 | 4 807
692 |
| | -fomit-frame-pointer -funroll-loops
| |
|gcc2.6.3 | -O3 -ffast-math -m486 | 4 233
641 |
| | -fomit-frame-pointer -funroll-loops
| |
|gcc2.7.2.1 | -O3 -ffast-math -m486 | 4 149
377 |
| | -fomit-frame-pointer -funroll-loops
| |
|gpc2.0 | -O3 -ffast-math -m486 | 3 433
962 |
| | -fomit-frame-pointer -funroll-loops
| |
|vc5.0 | (optimalizace na max) | 3 060
908 |
|wc10.0 | -7 -5 -ol -ol+ -om -op -or -ot -fp5 | 2 222
222 |
| | -fpi87
| |
|wc10.0 | -5 -7 | 2 217
249 |
|delphi | | 2 012
012 |
|plan9 | (v IDE-586,speed+size optim.) | 1 623
376 |
|vc1.0 | (v IDE-586,speed+size optim.) | 1 531
393 |
|bc4.5 | (v IDE-486,fastest executable) | 1 455
604 |
|bc3.1 | (v IDE-386,fastest executable) | 1 433
070 |
|gcc2.7.2.1 | (no optimizations) | 1 281
348 |
|gpc2.0 | (no optimizations) | 1 109
756 |
|bp7.0 | | 901
713 |
|tc2.0 | -1 -f87 -O -r -Z -G -a -mt | 846
511 |
|bc4.0 | (v IDE-486,speed optimizations) | 755
857 |
|bc2.0 | | 716
535 |
|bc2.0 | -G -O -2 -Z -r | 716
535 |
|tc2.0 | | 546
546 |
|bc4.0 | (v IDE-486,speed+size optim.) | -
3.6676456... |
this chart doesnt include the new visual c++ 6.0 however.
compiling each source file i dont think would really help all that
much. the compiliation speed-ups come mainly from certain assumptions
that you can tell the compiler to make (such as loops optimization and
function integration).
a way to make a program truly faster would be to code parts that are
used frequently directly into assembly and to code it so that it can
use the registers of the cpu directly and not have to access the
memory. however, this requires knowledge that niether stl nor i possess
(unless someone decides to make a tirrean chip).
hopefully that chart i posted above will help you with finding more
optimizations for the code.
after seeing that, i saw no reason why to compile in visual c++ 6.0
visual c++ is really good for windows manipulations. (duh)
Sent via Deja.com http://www.deja.com/
Before you buy.
- Raw text -