|
From: Martin C. <cos...@wa...> - 2008-03-31 07:22:44
|
S. Newhouse wrote: > Hello, > I am running an MBP with OSX 10.4.11. This has an Intel Core 2 duo at > 2.13GHz I also have a Linux box with Fedora Core 6 and an Intel Core 2 > duo at 2.13 GHz. Both have 3 GB RAM. > I compiled the attached code 'sample_bat.c' a sample program using gmp > and mpfr on both machines with the following execution times. The code > on the MBP was compiled with cc -O3 and on the Linux bax with cc -O. > Here are the execution times: > > MBP: [sen@basie MPFR]$ time ./sample_bat > Sum is 2.7182818284590452353602874713526624977572470936999 > > real 0m2.384s > user 0m2.242s > sys 0m0.025s > > > Linux: > [sen@gumbie MPFR]$ time sample_bat > Sum is 2.7182818284590452353602874713526624977572470936999 > > real 0m1.057s > user 0m1.056s > sys 0m0.000s > > > Anyone know why the MBP is less than half the speed of the Linux box? On my new MBP with 2.4GHz I get real 0m0.896s user 0m0.892s sys 0m0.003s So it's not a general Apple slowness. My guess is that the bus speed on your MBP might have something to do with it. You might also consider upgrading to Leopard. I did this also on a slightly older iMac with a core2 duo 2.16 GHz and got the same speed as on your linux box. The time was halved when I used the libmpfr1-64bit variants: real 0m0.525s user 0m0.521s sys 0m0.002s -- Martin |