Who wrote the script that uses a threaded factorial to test the speed of a processor?
Who wrote the script that uses a threaded factorial to test the speed of a processor? I can't find the thread were I posted in it. The script would do some math and would test the speed of current processors. Everyone was posting some benchmarks off their systems.
Which one of you sneaky nerds did it so I can find it again?
Is it me or is the search feature on this site not seeming to work correctly? I can't put my finger on it but something doesn't seem right with it.
Which one of you sneaky nerds did it so I can find it again?
Is it me or is the search feature on this site not seeming to work correctly? I can't put my finger on it but something doesn't seem right with it.
Comments
Try this: right click and download linked file, then unzip if needed
http://www.johnnylundy.com/threadedFactorial.c.zip
Now if I could just find the original thread...
Originally posted by lundy
I wrote it. It's been a while since I ran it so I hope this is the right version.
Try this: right click and download linked file, then unzip if needed
http://www.johnnylundy.com/threadedFactorial.c.zip
I can download the zip file, then unzip it, but it opens with Text Edit. Any suggestions?
Originally posted by aplnub
I can download the zip file, then unzip it, but it opens with Text Edit. Any suggestions?
You need to compile it.
For simplicity, put the file on your desktop. Then, in Terminal,
cd ~/Desktop
gcc threadedFactorial.c
then when it is finished compiling, the file "a.out" on the desktop is the executable. So we have to set its executable flag to make it executable and then execute it (you can rename it to anything you want BTW)
chmod +x a.out
./a.out
the "./" (dot-slash, where SlashDot got its name) is the command to execute a binary file.
I left it uncompiled because of the different computers people have. I have NOT tried compiling it for Intel - it should work fine but I don't know if you have to tell the gcc compiler something special.
aplnub-iMac-G5:~/desktop aplnub$ gcc threadedFactorial.c
-bash: gcc: command not found
Originally posted by aplnub
When I do the ggc threadedfactorial.c I get the following:
aplnub-iMac-G5:~/desktop aplnub$ gcc threadedFactorial.c
-bash: gcc: command not found
OK you don't have the Developer Tools installed.
What happens when you say "cc" instead of "gcc"?
Originally posted by aplnub
Thanks! I will yet the download when I get back in the office. I am going to run it on my new duo mini and post back the results.
Now if I could just find the original thread...
I can't find the thread either. I am pretty sure the title was something like "Compute/Calculate 50 million factorials" and was over a year ago - it was a very popular thread.
Originally posted by aplnub
Same thing. command not found
Gimme a little time and I will compile a Universal Binary for you.
Johnny
Originally posted by lundy
Gimme a little time and I will compile a Universal Binary for you.
Johnny
OK - try this one, should be a Universal Binary
http://www.johnnylundy.com/ThreadedFactorial.zip
Unzip, do the chmod and then do the dot-slash on it.
EDIT: Put the words "Threaded Factorial" in quotes, as the space between the words will confuse the BSD shell.
Originally posted by lundy
OK - try this one, should be a Universal Binary
http://www.johnnylundy.com/ThreadedFactorial.zip
Unzip, do the chmod and then do the dot-slash on it.
EDIT: Put the words "Threaded Factorial" in quotes, as the space between the words will confuse the BSD shell.
it worked with no tinkering at all.
Intel Mac Mini Core Duo - 3 seconds
Originally posted by aplnub
it worked with no tinkering at all.
Intel Mac Mini Core Duo - 3 seconds
Dual 2.0 G5 (the original G5) takes 4 seconds. Core Duo wins.
Originally posted by macserverX
I got here after the original C file was removed (the link didn't work anyway). Could that program give a more accurate output of time. The two examples given (3 and 4 sec) could have been like 3.8 and 4.1 or so. So if you could modify it to output a more accurate measure.
You can just give it more iterations to do.
the syntax is
threadedFactorial cores iterations
where cores is the number of processors and iterations is the iterations.
if you omit both arguments, it defaults to the number of cores in the machine, and 50 million iterations.
Examples of how to do 100 million and 200 million iterations on a Core Duo:
./"Threaded Factorial" 2 100000000
./"Threaded Factorial" 2 200000000
etc.
27 seconds!!
Any way to get this or something similar to work on an x86 for comparisons?
Originally posted by iPoster
iMac G4 1Ghz
27 seconds!!
iBook G3 700 MHz
26 seconds
You must have something CPU-intensive running in the background.
Originally posted by iPoster
iMac G4 1Ghz
27 seconds!!
Any way to get this or something similar to work on an x86 for comparisons?
It's a Universal Binary. It should work on the Intel Macs.
It calls into BSD, so don't try it on a WIndows system.