Hi,
I have tested the benchmark for speed optimization in QNX6.1, QNX4.25,
Windows DOS, and Windows98. For more information on the benchmark algorithm
and code,
go to http://student.cs.ucc.ie/01/moore/index216.html. From the result, I
got some questions about compile options for speed optimization in GCC.
Please refer this and talk about how to make the fastest program in QNX 6.
Here is the result of benchmark run on Pentium III 847Mhz.The program was
made with option ¡®-O2¡¯.
H: The Towers of Hanoi puzzle (26 disks)
E: Heap Sort (Array Size=2MBytes)
M: Matrix Multiply (500x500)
F: FFT (131072 points)
L: Flops (MFLOPS(3))
I: Fibonacci (40¡¯th number)
______________QNX6.1_______QNX4.25________Windows 98-DOS__Windows 98
___(gcc 2.95.2)(Watcom 10.6)(djgpp 2.95.3)(msc 12.0)
H: (sec)_______3.44 sec_____2.28_____________5.08______________1.93
E: (MIPS)______603__________547_____________500_______________686
M: (sec)_______3.31_________3.35_____________8.52______________4.12
F: (sec)_______0.336_________0.5_____________0.41______________0.26
L: (MFLOPS)__151.4_________186.3___________185.2______________290.4
I: (sec)________4.442________2.99____________4.451_____________4.07
-
The compiler for the fastest program is the MSC. And we can estimate the
following comparison result.
MSC > QNX4 Watcom > QNX6 GCC > DJGPP -
The MSC is very fast than others. I think that it takes some capability
with MMX code.
Does anyone know that the GCC can take the MMX code? -
In the most of compiler, the program with speed optimization runs faster
than one with debug option. However, I have known that in case of QNX6 GCC,
the program with debug option is faster than speed in some algorithm, for
example, Fibonacci and Hanoi. Here is not this result. What is the reason?