results for benchmak and speed optimization

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

  1. The compiler for the fastest program is the MSC. And we can estimate the
    following comparison result.
    MSC > QNX4 Watcom > QNX6 GCC > DJGPP

  2. 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?

  3. 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?

purunsan@rtsolutions.co.kr
www.rtsolutions.co.kr

“Byoung-Hweh Huh” <purunsan@orgio.net> wrote in message
news:a1tk9m$k64$1@inn.qnx.com

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.

You might want to try -mcpu=pentium to specify Pentium Class CPU.
I think Windows compiler assume Pentium, while gcc assumes 386 by default.

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

  1. The compiler for the fastest program is the MSC. And we can estimate
    the
    following comparison result.
    MSC > QNX4 Watcom > QNX6 GCC > DJGPP

Do not forget that you are also benchmarking the OS as well.

  1. 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?

Not to my knowledge.

  1. 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?

purunsan@rtsolutions.co.kr
www.rtsolutions.co.kr
\

In article <a1tk9m$k64$1@inn.qnx.com>,
Byoung-Hweh Huh <purunsan@orgio.net> wrote:

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

  1. The compiler for the fastest program is the MSC. And we can estimate
    the following comparison result.
    MSC > QNX4 Watcom > QNX6 GCC > DJGPP

Maybe. It’s worth point out that QNX6 GCC and DJGPP are both gcc,
and so we can also debate whether it is faster than itself or not. :slight_smile:
But this just show how delicate this kind of thing is. For instance,
the difference could be because of something else running, or the OS
itself, or that one used shared libs and the other didn’t, whether
the accuracy of floating point was the same and/or whether hardware
or software emulation was used, performance options set for the system,
and so on.

  1. The MSC is very fast than others.

I don’t see that result. I see it faster on some things, and
slower on some things.

I think that it takes some capability
with MMX code.
Does anyone know that the GCC can take the MMX code?

I don’t know.

  1. 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?

Just to be clear: Are you saying that running the Tower of Hanoi
with QNX6 GCC with debug on is faster than running the Tower of Hanoi
with QNX6 GCC with debug off?

Greg Comeau What’s next: additional Windows backends and ‘export’!
Comeau C/C++ ONLINE ==> http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware’s Libraries… Have you tried it?

That’s interesting. Here is my 2 cents.
Add Standard benchmark integer and floating point (SPECint* & SPECfps*)
Add benchmarks like

  • 10000 new/init/delete,
  • exception thrown x deep, declared at each level
  • j = *(int *)(&i);

cheers,
Igor

Hi…

As an exercise, lets try to do the same thing on other platforms
-powerPC, arm-, and see how many compilers can do it for the same cost.

Some people have said this before, but my point is that gcc is the most
useful compiler today even if it does not generate the fastest code for
Nto 2.1. In general, we could argue that gcc is the most useful
compiler today -as far as Nto 2.1 is concerned- since we can deploy the
same code on a number of platforms that run Nto. This is pretty
remarkable. I also used Watcom with 4.25, but I do not remember using
the qnx-powerPC duo before.

Regards…

Miguel.

Byoung-Hweh Huh wrote:

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

  1. The compiler for the fastest program is the MSC. And we can estimate the
    following comparison result.
    MSC > QNX4 Watcom > QNX6 GCC > DJGPP

  2. 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?

  3. 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?

purunsan@rtsolutions.co.kr
www.rtsolutions.co.kr

my opinions are mine, only mine, solely mine, and they are not related
in any possible way to the institution(s) in which I study and work.

Miguel Simon
Research Engineer
School of Aerospace and Mechanical Engineering
University of Oklahoma
http://www.amerobotics.ou.edu/
http://www.saic.com

Well, having your system be able to run on a variety of platforms
is exciting but useless thing if your embedded system is based only on x86.
As I see most of the QNX customers are from QNX4 where x86 was the only
platform available and it’s hard for them to accept new dev. tools and
hence new NTO if resulting code needs more memory to start up, more disk
space to store executables and you need a faster cpu to make a program
be fast enought.

Just imagin a hummer which is able to be used as a screw driver.
It’s a pretty remarkable new feature but only if this hummer is still
effective as an old dumb hummer you get use to.

cheers,
Igor

“Miguel Simon” <simon@ou.edu> wrote in message
news:3C451C1E.5A333049@ou.edu

Hi…

As an exercise, lets try to do the same thing on other platforms
-powerPC, arm-, and see how many compilers can do it for the same cost.

Some people have said this before, but my point is that gcc is the most
useful compiler today even if it does not generate the fastest code for
Nto 2.1. In general, we could argue that gcc is the most useful
compiler today -as far as Nto 2.1 is concerned- since we can deploy the
same code on a number of platforms that run Nto. This is pretty
remarkable. I also used Watcom with 4.25, but I do not remember using
the qnx-powerPC duo before.

Regards…

Miguel.

“Igor Levko” <no_spam@nihrena.net> wrote in message
news:a24364$gbn$1@inn.qnx.com

Well, having your system be able to run on a variety of platforms
is exciting but useless thing if your embedded system is based only on
x86.

True.

As I see most of the QNX customers are from QNX4 where x86 was the only
platform available and it’s hard for them to accept new dev. tools and
hence new NTO if resulting code needs more memory to start up, more disk
space to store executables and you need a faster cpu to make a program
be fast enought.

Actually, most QNX4 customers stick with QNX4, until their requirements
change in such a way that makes migrating worthwhile. But you’re correct in
that it does make it more difficult for some customers.

Just imagin a hummer which is able to be used as a screw driver.
It’s a pretty remarkable new feature but only if this hummer is still
effective as an old dumb hummer you get use to.

Well, why get the new hummer if the old one worked and nothing has changed
in terms of requirements? I think that goes, without saying :slight_smile:


Cheers,
Adam

QNX Software Systems Ltd.
[ amallory@qnx.com ]

With a PC, I always felt limited by the software available.
On Unix, I am limited only by my knowledge.
–Peter J. Schoenster <pschon@baste.magibox.net>

“Adam Mallory” <amallory@qnx.com> wrote in message
news:a29avd$fnn$1@nntp.qnx.com

“Igor Levko” <> no_spam@nihrena.net> > wrote in message
news:a24364$gbn$> 1@inn.qnx.com> …

Well, why get the new hummer if the old one worked and nothing has
changed
in terms of requirements? I think that goes, without saying > :slight_smile:

Adam, I wish you be QSSL marketing director :wink:.
The answer is simple as a piece of laundry soap - license price.
QNX6 is about 4 times cheaper …

cheers,
Igor

Never wrestle with a pig. You both get all dirty, and the pig likes it. (c)
Goblin