There was some discussion a month or two back about different algorithms 
for prime_pi. IIRC, Mathematica's was the fastest, Sage's was second 
fastest and Maple's method was dumb and just counted them like a 10 year 
old could do.

I pointed out a link to those with accounts on sage.math.users of a 
discussion on the newsgroup comp.unix.solaris about how to get maximum 
performance from a Sun T5240 (the same machine as 't2'). It was quite a 
technical discussion about why old machines can be faster or slower, 
depending how the program is written. Someone wrote a program which 
computed the primes under 10,000 in C, and compared the speed of his old 
machine to his high spec Sun T5240 and showed the old machine was quicker.

(BTW, 't2' has 16 cores and 128 virtual processors)

A Sun employee, Andrew Gabriel, who I happen to know, then re-wrote the 
program for him in a way to exploit the Sun T5240 properly. William 
re-run the program yesterday and found the time drop from 21 seconds to 
0.6 seconds when he used 128 threads.

It then occurred to me that perhaps Maple's dumb method of computing 
number of primes under n might be silly on most machines, but might if 
re-written to use a parallel machine properly, it could be the most 
sensible way to do it.

But I've no idea how the dumb method compares with the Sage 
implementation or Mathematica. Obviously if the dumb method is 3 orders 
of magnitude slower, then I doubt much could be done with it, for now at 
least, though I can see machines with 1000 virtual processors wont be 
long, and might actually exist now.

It would be very interesting to see if Mathematica could do anything 
very quick on t2. Clearly the hardware is capable of high performance - 
it's just we are not getting it because most of the programs we are 
using on t2 at the minute don't exploit the machine properly. Perhaps 
Mathematica might switch to a better method on parallel machines.

For those interested, the link is here.

http://groups.google.co.uk/group/comp.unix.solaris/browse_thread/thread/7041af61bab6cfd/718b4fb647765119?hl=en&ie=UTF-8&q=Single-threaded+T5240+performance&pli=1

You might want to try the program on your dual and quad processor 
machines, but you are not likely to get the speeds possible on t2.

Dave


PS
Mathematica 6 failed to determine the number of CPUs the machine had on 
Solaris SPARC and always assumed one. I found the reason for this, and 
posted the details to sci.math.symbolic someone from  which WRI thanked 
me for,

http://groups.google.cl/group/sci.math.symbolic/browse_thread/thread/c07a8230fbf01bc1/837b00dfbaaa31aa



PPS
sci.math.symoblic is a much quicker way to get help on MMA issues than 
the Mathematica newsgroup, as the latter is moderated with only one 
moderator. Even Wolfram Research employees can't post to that without 
his approval !




--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to