You are not logged in.
My Dad and I compared Mathematica's speed when factoring the integer (2^227) - 1. I have an intel E2140 Core Duo processor with 2 GB of memory and run Arch Linux. He runs Vista on a similar processor (I don't remember exactly, but it doesn't matter much considering the results) with 2 GB memory. Here are the results:
Command: FactorInteger[2^227-1]//Timing
Output: {1765.65,{{26986333437777017,1},{7992177738205979626491506950867720953545660121688631,1}}}
where 1765.65 represents the time required to calculate in seconds. Here is my result in Arch Linux:
Output: {7.65884, {{26986333437777017,
1}, {7992177738205979626491506950867720953545660121688631, 1}}}
I'm not sure how many times he's performed the calculation, but I've repeated it a number of times with results varying + or - .2 seconds. I also know that the author of the book that suggested the command to benchmark computers got something similar to his result.
Can anyone else with Mathematica try this and report their results? I am not sure what to make of it. I know that linux has a superior design than Windows. But how can we explain a difference by several orders of magnitude?
Also, the same results on a Debian minimal installation were nearly indistinguishable from Arch.
Last edited by kgostanek (2008-08-23 20:38:13)
Offline
Wait, you're saying that your dad's pc took half an hour to calculate that result? I don't buy it, he would have definitely noticed something wrong.
EDIT : I don't use mathematica myself, but perhaps your command is wrong : http://reference.wolfram.com/mathematic … iming.html
Last edited by Lord Illidan (2008-08-23 20:48:06)
Offline
Timing[FactorInteger[2^227 - 1]] does the same thing. Here is the result:
{7.63584, {{26986333437777017,
1}, {7992177738205979626491506950867720953545660121688631, 1}}}
I considered that the result of his test was an abberation. But I once performed it on my own copy of Vista (which I don't use anymore) and got a result only a few seconds faster than his. Also, I know that the author of the book that suggested that test got something similar as well.
Offline
I belive the measures may be in milliseconds (1/1000 of a second), not seconds.
Offline
I belive the measures may be in milliseconds (1/1000 of a second), not seconds.
The Mathematica site specifically states seconds, though. Only way to prove it is sit in front of the computer with a stop watch, even though..if it is really in seconds, you'll get bored ![]()
Offline
I doubt very much that such a huge difference is solely due to the OS. Are you comparing the same versions of Mathematica? According to this page -- What methods does FactorInteger use? -- version 4.2 of Mathematica uses a factorization method that is 40-80 times faster for numbers with large prime factors than that used by versions 3.0-4.1. That might account for at least some of the difference you observed.
Offline
I doubt very much that such a huge difference is solely due to the OS. Are you comparing the same versions of Mathematica? According to this page -- What methods does FactorInteger use? -- version 4.2 of Mathematica uses a factorization method that is 40-80 times faster for numbers with large prime factors than that used by versions 3.0-4.1. That might account for at least some of the difference you observed.
Um, Mathematica 4.1 is quite old, 8 years old in fact...and I don't think that he's using such an old version on Vista.
Offline
I use version 6.0.3.0 and my dad uses version 6 as well.
My own result using Vista was very similar to my Dad's result. Again, I used Mathematica 6 there. I haven't made any hardware changes. The test seems fairly controlled.
After I ran the function, I was preparing to go do something else while I waited until the surprising results came up. It was, in fact, after only a few seconds.
Offline
There is a known bug in Mathematica's FactorInteger implementation in V6.0 vs V5.2:
http://forums.wolfram.com/mathgroup/arc … 00434.html
A better way to benchamark Mathematica is to use the built-in benchmark:
Help -> About Mathematica -> System Information -> Benchmark with MathematicaMark
I've never noticed a difference in Windows vs Linux performance. I did once compare Mathematica's performance under 32 vs 64-bit Linux: approximately 11% faster with 64-bit (Mathematica V6.0.1.0).
http://article.gmane.org/gmane.linux.di … neral/3321
The FactorInteger example you reference took 749 seconds on my 64-bit Arch machine (2.33 GHz Core2). Top showed only one core utilized during the operation.
Offline
The FactorInteger example took 746 seconds on my machine using 32-bit Windows XP. The Arch/Windows results are virtually identical for me. Perhaps your differences are related to the FactorInteger bug mentioned earlier?
Offline
The FactorInteger example took 746 seconds on my machine using 32-bit Windows XP. The Arch/Windows results are virtually identical for me. Perhaps your differences are related to the FactorInteger bug mentioned earlier?
Yes, it could be that my release of version 6 differs from my Dad's version. Perhaps his release has it and mine doesn't. That would mean that yours also has the bug. Which release do you have?
Offline
not to be nitpicking, but i can also mean that you have the version with the bug... have you checked?
Stand back, intruder, or i'll blast you out of space! I am Klixon and I don't want any dealings with you human lifeforms. I'm a cyborg!
Offline
The Linux version is 6.0.1.0 as reported in Help -> About Mathematica
The Windows version is 6.0.0 as reported in Help -> About Mathematica
I don't know how long the command should take; therefore I cannot be certain if I am affected. I would assume that I am as faster times have been reported on slower machines utilizing v5.2.
Offline
Hmm...Okay, I am running 6.0.3.0. It's a reasonable guess that the bug was corrected in either 6.0.2.0 or 6.0.3.0. Interesting - if it is in fact a bug - the algorithm still works correctly. Now I am curious to know how Maple compares when factoring the same thing.
I'll hypothesize that Mathematica is faster. Some guy at work once asked me to try and solve some equation in Maple, which I used at work. After Maple produced it's result, I went home for lunch to see what Mathematica had to say. It turns out it could not be solved symbolically. But Mathematica gave an output that indicated to me that it was designed with clearer thinking. I'll install Maple on my home computer and compare.
I know this is not related to Arch, but let me ask anyway: Does anyone have any insight into which computer algebra system is most capable? I confess that I am biased towards Mathematica. I am in awe of Wolfram himself. Ah, to have a mind like his...
Last edited by kgostanek (2008-08-24 03:16:39)
Offline
Mathematica has a winning over most of the engineers at Cal if that is any testament.
Offline
MATLAB's pretty horrible
the syntax is terrible.
After having used C, Python and many other programming languages, MATLAB is just downright frustrating. The syntax always seems so counterintuitive to what I'm used to...
Last edited by iphitus (2008-08-24 08:21:44)
Offline