Re: Linux c++ opmization--- linux runs at half the speed of windows?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Thu, 8 Mar 2007, Shane R wrote:

I am trying to optimize a c++ application that I ported from a windows system to Linux.

1. Do you use gcc under windows as well? If so which version on windows and which on Linux? gcc is not the best optimizer in the world....

2. Run...
  vmstat 5
for a half a page whilst your app is running and post that.

3. Watch "top", is your CPU running at 100%? Is it very near 100% in
user mode? Is your particular app running at very near 100% in user mode?


4. Run your app under "strace" and see what it's doing.

5. -O3 and -funroll-loops does not necessarily improve things if it
destroys the cache utility.

6. -O2 -fomit-frame-pointer -march=WHATEVERAPPROPRIATE may do better.

7. My general experience is Linux Apps run significantly faster than windows.

8. Fire up gkrellm. Hmm you say you have a centrino duo, does that
mean it has dual cores? Does gkrellm show you have two CPU's running?
ie. Do you have the right kernel for your Dual core?

The app is a terminal based application that does some one time file io at the start then runs completely in memory.

Does it read/write lots to any file / device eg. terminal?




John Carter                             Phone : (64)(3) 358 6639
Tait Electronics                        Fax   : (64)(3) 359 4632
PO Box 1645 Christchurch                Email : john.carter@xxxxxxxxxx
New Zealand


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux