Matt Garman wrote:
I just got a new hard disk and installed gentoo on it.  I've got a c++
development project that I was working on that runs noticeably slower on
my gentoo box than it did on under my debian unstable installation.

I basically wrote a CSV file reader in C++.  The implementation uses a
vector of vectors (one vector per row for each field, and a vector for
every row).  In other words:

std::vector< std::vector< std::string > > data;

Anyway, my data file has roughly 50,000 records.  Under the Debian
system, it took, on average, two or three seconds to load this data into
memory.  However, under the Gentoo system, it takes eight or nine
seconds on average to load the data.  (Run times don't change
appreciably between subsequent runs, so I don't think caching is the
issue here.)

That's a pretty dramatic change, in my opinion.  No hardware on my
system has changed (except the new disk, which I have verified is not
the source of the slowdown (it's a 10k SCSI drive, should be faster if
anything)).

I haven't changed any compile settings from one system to the other.
Just for kicks, I tried using the optimising options I'm using for
Gentoo in my /etc/make.conf: "-O3 -march=athlon-xp -pipe".  That knocked
a couple seconds off the load time, but the Debian-compiled version is
still much faster.

For what it's worth, the Debian system used:

g++ (GCC) 3.3.2 20030908 (Debian prerelease)

And the Gentoo system is using:

g++ (GCC) 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r2, propolice)

Why don't you upgrade to 3.3.1-r4 (its currently ~x86 but it works well) or something similar on Gentoo and compile the program. Then you will know for sure.


--
Andrew Gaffney


-- [EMAIL PROTECTED] mailing list



Reply via email to