From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17924 invoked by alias); 8 Mar 2007 16:10:46 -0000 Received: (qmail 17915 invoked by uid 22791); 8 Mar 2007 16:10:46 -0000 X-Spam-Check-By: sourceware.org Received: from urmel-5.rz.uni-frankfurt.de (HELO urmel-5.rz.uni-frankfurt.de) (141.2.22.233) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 08 Mar 2007 16:10:38 +0000 Received: from blade22-2.rz.uni-frankfurt.de ([141.2.22.192]) by urmel-5.rz.uni-frankfurt.de with esmtps (TLSv1:AES256-SHA:256) (Exim 4.66) (envelope-from ) id 1HPLCN-0001Ec-21; Thu, 08 Mar 2007 17:10:35 +0100 Received: from dumbo.ghl40.whgl.uni-frankfurt.de ([141.2.119.130]) by mail.server with esmtp (Exim 4.66) (envelope-from ) id 1HPLCJ-0003Ou-Kj; Thu, 08 Mar 2007 17:10:31 +0100 Message-ID: <45F035B0.1050809@cs.uni-frankfurt.de> Date: Thu, 08 Mar 2007 17:10:00 -0000 From: Sven Eschenberg User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: Shane R CC: gcc-help@gcc.gnu.org Subject: Re: Linux c++ opmization--- linux runs at half the speed of windows? References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-MailScanner: Found to be clean X-MailScanner-SpamCheck: X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2007-03/txt/msg00110.txt.bz2 Hi Shane, I am wondering if you are using large memory support in linux (since you got 2GB)? I am asking, because on my system I experienced the following strange behavior: Compiling a whole package, which is fairly big the compile time varies strongly between the setup of using large memory support and when not using it. As soon as I use large memory support the compile times grows by a factor between 2 and 3, I never did a profiling, what exactly causes the slow down, it just seems obvious that the large memory support causes a massive slowdown (certainly on memory access). I wonder if you are basically having the same problem. Maybe, after collecting some profiling data, you might come to the conclusion that memory access takes a lot of time, maybe you could check against a kernel without large memory support. I might be completely wrong, but it came across my mind, since you got 2 GB of RAM and might have large memory support enabled. Regards -Sven Shane R wrote: > Hi, > > I hope this is the appropriate forum. Please direct me to the correct > one if it is not. > > I am trying to optimize a c++ application that I ported from a windows > system to Linux. > The app is a terminal based application that does some one time file > io at the start then runs completely in memory. After the one time io > the app runs successive timed epochs on the same data in Windows as > Linux. The app is a program that runs some code for doing non-linear > optmization (math stuff). > > The reason why I am posting is that I timed the time it takes for the > application to complete an epoch. It take twice as long in Linux as > windows?!?! > > My system is an Intel Centrino Duo with 2gigs of ram. The application > is only using a fraction of available memory in windows and linux. The > application is single-threaded in both. > > I am using Visual Studio 2003 in Windows and when I type gcc -v I get: > Target: i486-linux-gnu > Configured with: ../src/configure -v > --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr > --enable-shared --with-system-zlib --libexecdir=/usr/lib > --without-included-gettext --enable-threads=posix --enable-nls > --program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu > --enable-libstdcxx-debug --enable-mpfr --enable-checking=release > i486-linux-gnu > Thread model: posix > gcc version 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)