On 9/23/07, William Stein <[EMAIL PROTECTED]> wrote: > > On 9/23/07, Jason Martin <[EMAIL PROTECTED]> wrote: > > Some thoughts: > > > > 1. I've been doing some performance comparisons on GMP 4.2.2 with the > > patches that Sage uses, and I haven't seen any remarkable differences > > between 4.2.2 and 4.2.1. Granted, I have only tested Linux on > > AMD64/Intel64 and OS X on Intel64. Perhaps some other platforms have > > a greater difference. (By the way, the GPL patches for gcd/xgcd seem > > to work just fine.) > > Is GMP-4.2.1 with the gcd/xgcd patch vastly faster than GMP-4.2.2 at > what the gcd patch is for (i.e., gcd's of million digit numbers)?
I didn't test that. My test was that I built gmp-4.2.2 with gcd patches, and then I built Pari with it and all the tests passed. I didn't do timing test with the gcd patches because I didn't expect any differences in gcd calculations done with a patched 4.2.1 (see below). The gcd routines all rely on the underlying mpn routines (which implement the very basic add, sub, mul, div functions). Since the gcd patches are the same, they won't change in speed if the underlying mpn routines don't change. The only issue I was concerned with was would the gcd patches compile with the new build scripts in 4.2.2. > > It is nice that it will compile under OS X now without patching... and > > it even builds dynamic libraries. It is somewhat slow without > > patches, though. > > Do you mean that GMP-4.2.2 is somewhat slow without patches? > Or that GMP-4.2.1 is? Or? Sorry, I should have been more specific: On OS X (Intel, Core2) ------------------------------ What I meant was that 4.2.2 will compile on OS X without any patching, and it will build dynamic libraries. However, the default built of 4.2.2 under OS X is very slow. Patching it with my patches (in 64bit mode) gives the same performance as the patched 4.2.1 code (tested with gmpbench), and you can build dynamic libraries. On Linux ------------- On AMD64 machines, there is no change. Using Gaudry's patches give you a huge speed up just like with 4.2.1. On Core2 machines, 4.2.2 is marginally faster than 4.2.1 due to a new mpn parameters header file being included in the code. If you use my patches, then 4.2.2 is just as fast as 4.2.1 with my patches (a 30-40% speed up over unpatched versions). A quick analysis of the GMP-4.2.2 code shows that almost all of the updates have been in the build scripts. There is a new mpn parameters header file which is just the result of "make tune" being run on a Core2, but that isn't very significant. Bottom line: Performance-wise, the *patched* version of 4.2.2 will be roughly equivalent to *patched* version of 4.2.1. The patches are compatibly with both 4.2.1 and 4.2.2. --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---