From: John Carter <john.carter@tait.co.nz>
To: Shane R <crazguy22@hotmail.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: Linux c++ opmization--- linux runs at half the speed of windows?
Date: Mon, 12 Mar 2007 23:49:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.64.0703131204280.8192@parore.tait.co.nz> (raw)
In-Reply-To: <BAY21-F250BABA055D5D844068C13AE790@phx.gbl>
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@tait.co.nz
New Zealand
prev parent reply other threads:[~2007-03-12 23:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-08 12:30 Shane R
2007-03-08 15:01 ` Andrew Haley
2007-03-08 16:10 ` Atwood, Robert C
2007-03-08 17:10 ` Sven Eschenberg
2007-03-12 22:06 ` Lawrence Crowl
2007-03-12 23:13 ` Artūras Moskvinas
2007-03-13 8:57 ` Galloth
2007-03-12 23:49 ` John Carter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0703131204280.8192@parore.tait.co.nz \
--to=john.carter@tait.co.nz \
--cc=crazguy22@hotmail.com \
--cc=gcc-help@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).