4.2 running slower than 4.1 on Pentium4, ideas?

Rev. Chris Korda victimofleisure at gmail.com
Thu Apr 24 00:12:30 CEST 2008


My tests show that for x86/Pentium4, 4.2 runs slower than 4.1, and
presumably this is not the expected result. There are lots of differences so
it could take me a long time to discover which ones are causing the problem.
Perhaps others on this list who are more familiar with GMP will be able to
suggest some likely causes.

This is the GMP discussion list, yes? If my post is inappropriate for some
reason it would be helpful to at least say so, or better yet explain *why*
it's inappropriate. Otherwise I have no idea what's wrong and no way of
fixing it. I'm trying to help improve GMP, isn't that how open source
projects are supposed to work?

Best regards,

Chris

-----Original Message-----
From: Chris Korda [mailto:ckorda at gmail.com]
Sent: Friday, April 18, 2008 10:22 PM
To: gmp-discuss-owner at swox.com
Subject: Re: have good VC++ 6.0 build of GMP 4.1; make it available?


I posted a response to Décio Luiz Gazzoni Filho's criticisms yesterday, but
it never appeared though the web interface says it was moderated. Just
wondering if the post was denied, and if so for what reason.

Best regards,

Chris Korda



-----Original Message-----
From: Rev. Chris Korda [mailto:victimofleisure at gmail.com]
Sent: Friday, April 18, 2008 12:03 AM
To: gmp-discuss at swox.com
Subject: Re: have good VC++ 6.0 build of GMP 4.1; make it available?


Thanks for the constructive advice. My benchmarking was indeed bogus, and I
have rectified this by doing more precise tests. I enclose the results
below.

All tests were performed on the same hardware: Intel Core2 6700 @ 2.66 GHz,
3.62 GB RAM

compiler:	VC++ 6.0
GMP version:	4.1.2 (my port)
GMP target:	Pentium4
GmpBench:	106.02, 105.86

compiler:	.NET 2005
GMP version:	4.1.2 (my port)
GMP target:	Pentium4
GmpBench:	105.25, 105.33

compiler:	.NET 2005
GMP version:	4.2.2 (Gladman's port)
GMP target:	Pentium4
GmpBench:	111.29, 111.34

I retract my complaint that .NET was slower. All other things being equal,
.NET is slightly faster than MFC6, as you predicted.

On the other hand, 4.2 is definitely running slower than 4.1. Admittedly the
difference is only 5%, not the 15% I originally reported, but 5% is still
significant. I assume the slowdown must be caused either by revisions made
in 4.2, or by some error in Gladman's port of 4.2. Which is the case I can't
yet say. I'm comparing the 4.1 and 4.2 source trees, but the number of
differences is large so it will take time.

To answer the other points: I'm NOT using managed code. The calling
convention in ALL cases is cdecl. It couldn't be fastcall because the x86
assembler sources are hard-coded for cdecl.

Thanks again for your help. GMP is awesome and I will gladly contribute by
trying to get to the bottom of this mystery.

Chris Korda
http://whorld.org



More information about the gmp-discuss mailing list