This is the mail archive of the libstdc++@sources.redhat.com mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

long long performance



This may not be the best place to post this comment...  Please tell me
where to redirect if necessary.

I've been running some benchmarks of the basic operations ( inc, add,
mult, assign, static_cast ) for different numeric types (long, double,
long long).

Most of the results are what i expected.  The really bizarre result was
for the multiply op for "long long", which was 6 times slower than that
for a long or double multiply.  This seemed like an excessive
performance hit - can anyone explain why this might be??  The "long
long" inc, add, and assign operations were okay - performance was
somewhere between that for just normal longs and doubles.  The other
anomally, casting a double to a "long long" took even longer than the
multiply op!!  Has anyone seen similar results?  Are there standard
benchmarking tools out there? - I built a custom tool for testing these
runtimes.

My system:  P3/600 w/Redhat 6.2.  I'm using an older snapshot of the
compiler and library: egcs-20000612, so this problem may have been fixed
more recently.

My configure options:
./configure --enable-libstdc++-v3 --enable-long-long
--enable-cshadow-headers --enable-namespaces --enable-threads=posix 
--prefix=/usr/local

I compiled my benchmark without any optimizations.  

I was considering taking advantage of the "long long" type, but now i'm
not sure if that is a good idea.  

-Rob

-- 
Rob Willis
rob@e-critical.com

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]