I have tested the benchmark for speed optimization in QNX6.1, QNX4.25,
Windows DOS, and Windows98. For more information on the benchmark algorithm
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
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?