More on Erlang Factoring
I tried something new. I was curious as to why the times varied so much, so I installed VMWare on my MacPro and ran the previously mentioned code under a few OSes. I have Ubuntu 64 bit installed on a separate HD for my Mac, so I installed one under VMWare to figure out how much the VM software would skew the other results. Looks like not by much.
MacPro, Ubuntu 64, direct boot -> 3.7 seconds
MacPro, Ubuntu 64, VMWare -> 3.9 seconds
With this out of the way, I can tell that the numbers I get from under VMWare would match up pretty closely to what I would see if I installed the OSes/Erlang directly. Here is what I found under the VMs:
MacPro, Windows XP 32bit -> 6.9 seconds
MacPro, Ubuntu 32 -> 18.9 seconds
What does this tell me? That the test I was using for Erlang speed is heavily based on the underlying bit-ness. Erlang on a 64 bit system is faster than the 32 bit version when doing large number arithmetic. And the AMD 4600+ is half the speed of the Xeon chip in the MacPro.
It looks like this is a win for 64 bit. These new results help explain something else I had seen last week - the speeds of F# and Haskell on the same problem. It took 32 seconds under Haskell and minutes under F# on a 32 bit machine to do the same factoring. I’m guessing that they would be faster on a 64 bit version, though I know that F# is only 32 bit right now, but I hope it becomes 64 bit soon!
-Edward