PDA

View Full Version : New speed testing program



Death Adder
08-02-2005, 12:31 PM
Here is a new version of the speed testing program. This one allows the pipeline to fill up and as such will give different results than before. This test seems to run a lot better for me which suggests the the P4 pipeline is quite nasty for floating point.

Here are my numbers for the new program (1.8Ghz P4)
Integer: 1.462
Single: 1.311
Double: 1.292

As you can see, the numbers are a lot closer now. This makes floating point worth it.

PS: The attached program was compiled unoptimized and compiled for a 386 so anyone should be able to run it. If compiled optimized the three numbers are basically equal.

ger21
08-02-2005, 12:33 PM
P3 750

2.453
2.390
2.438

Death Adder
08-02-2005, 04:51 PM
That's better. Now both you and I are seeing around the same speed for all three tests. This goes to prove that pipelining and memory access can make a big difference in the results. This also makes me comfortable that floating point should be OK to use in the cutting simulator.

Thanks!


P3 750

2.453
2.390
2.438

MrBean
08-02-2005, 06:21 PM
AMD 64bit 3400+

int 0.703
float 0.578
double 0.594

regards Terry.....

Death Adder
08-02-2005, 10:52 PM
Thanks MrBean! That's what I like to see: The floating point version was actually faster than the integer version! That's esp good because the floating point unit has a seperate pipeline from the main processor. That means that while the FPU is crunching on numbers the integer portion can do other things (branching, loops, sending data to the video card, etc).

This settles it. I hope to start coding up a test application w/ the floating point array idea sometime tomorrow. Hopefully I'll have something else people can run in a few days.

DAB_Design
08-02-2005, 10:56 PM
P4 2.2

1.0000
.875
.875

JFettig
08-02-2005, 11:00 PM
I dont know what this is but...
Dothan 1.7ghz
Time for int test: 1.041000
Time for float test: 0.841000
Time for double test: 0.821000

Jon

fyffe555
08-02-2005, 11:08 PM
0.56
0.51
0.51

amd64 @ 2.8ghz

results are inconsistent but float and double are usually the same?

Andrew

Death Adder
08-03-2005, 11:52 AM
Thanks again all! This is providing some interesting data.

The results will be inconsistant because it's running in windows so background tasks and random fluctuations in the space-time continuum effect the results (that or random task switching...)

Single and Double are usually the same speed or very close. Chances are that the processor's FPU is all double precision inside (actually I think some FPU's are 80 bit floating point inside) and just modifies the precision on the way out for single precision.


0.56
0.51
0.51

amd64 @ 2.8ghz

results are inconsistent but float and double are usually the same?

Andrew

fyffe555
08-03-2005, 12:48 PM
0.52
0.65
0.42

amd64 @ 2.8ghz XP64

joecnc2006
08-03-2005, 05:48 PM
P4 2.8g dell

I = 0.656000
F = 0.609000
D = 0.610000

Evodyne
08-03-2005, 07:29 PM
Death...

800 Mhz PIII:

Integer: 2.153
Float: 2.073
Double: 2.123

Evodyne

qmas99
07-01-2006, 03:18 AM
what are all the numbers mean?, is smaller better?

enigma99501
07-01-2006, 03:26 AM
T2300 @1.66

.843
.797
.797

JavaDog
07-01-2006, 09:20 AM
AMD Athlon MP 2600+ (Dual-CPU)

Time for int test: 0.781
Time for float test: 0.594
Time for double test: 0.609

Death Adder
07-01-2006, 12:29 PM
what are all the numbers mean?, is smaller better?

Yes, smaller is better. Basically the speed test just tries to figure out which type of math is faster on a given machine.

From the numbers that people are posting you can see that some machines can do floating point math faster than integer math. That's reversed for some other machines. In general newer machines do better at floating point than older machines.

The point to all of this is to determine whether it is worth it to attempt to use fixed point math in an application. At this point it would appear that it really is not worth it. Also, single and double math seems to be the same speed and so it's probably worth it to use doubles to get the extra precision.

datacop
07-16-2006, 11:50 PM
Death Adder's Speed Test.
Please don't touch anything or do anything with the machine until this is done!

Time for int test: 1.822000
Time for float test: 1.532000
Time for double test: 1.593000

Hit a key to end the program

P4 1.41Ghz 1GB Ram...

tobyaxis
07-17-2006, 01:18 AM
Here is a new version of the speed testing program. This one allows the pipeline to fill up and as such will give different results than before. This test seems to run a lot better for me which suggests the the P4 pipeline is quite nasty for floating point.

Here are my numbers for the new program (1.8Ghz P4)
Integer: 1.462
Single: 1.311
Double: 1.292

As you can see, the numbers are a lot closer now. This makes floating point worth it.

PS: The attached program was compiled unoptimized and compiled for a 386 so anyone should be able to run it. If compiled optimized the three numbers are basically equal.

Ok, I'm not that bright when it comes to computers and have one question. Are there any specific instructions for the test?
Downloaded and unzipped and waiting to run the test.
This PC is a Lap Top P4 2.0GHz 1GB Ram. Testing a Wirless connection.
The other PC is a P4 H/T 3.2GHz Duel and 1.5GB Ram and upgrading to 4GB Ram in a few months.

datacop
07-17-2006, 01:25 AM
Ok, I'm not that bright when it comes to computers and have one question. Are there any specific instructions for the test?
Downloaded and unzipped and waiting to run the test.
This PC is a Lap Top P4 2.0GHz 1GB Ram. Testing a Wirless connection.
The other PC is a P4 H/T 3.2GHz Duel and 1.5GB Ram and upgrading to 4GB Ram in a few months.

just unzip the file and run the test.exe inside....

The rest happens for you automagically.

tobyaxis
07-17-2006, 01:41 AM
Just found the text file that explains. Thanks DataCop.

BTW: Just PMed You.
:cheers:

Salty72
07-17-2006, 01:47 AM
centrino 1.7

0.89
0.86
0.859

efrem
07-19-2006, 11:14 AM
Dual xeon p4 3.2ghz
int. .64
float. .594
double .578

mikkojay
07-19-2006, 02:17 PM
One more for the stack

Time for int test: 0.828000
Time for float test: 0.796000
Time for double test: 0.782000

PC=Intel 2.4g 512mb RAM

Thanks, Mike

lerman
07-19-2006, 05:14 PM
The test seems to be a little too simple to have useful results.

Add in a do nothing test where the destination is just set to the Count. You will find that the time for that test is about the same as for the others. Most of the time is taken by the loop overhead, etc. Depending on the cache performance, it might take longer to store the results than it does to compute them.

There are a lot of existing benchmarks out there (although I don't know of one offhand) that should do a better job telling the whole story.

Ken

klick0
09-06-2006, 03:29 PM
Results with original code: (TEST 1)
Death Adder's Speed Test.
Please don't touch anything or do anything with the machine until this is done!

Time for int test: 1.822000
Time for float test: 2.023000
Time for double test: 2.043000


Results with mathmatic statements commented out, but printf statements left in place: (TEST 2)
Death Adder's Speed Test.
Please don't touch anything or do anything with the machine until this is done!

Time for int test: 1.722000
Time for float test: 1.732000
Time for double test: 1.723000

Results when printf's are taken out of the wrong spot, and put somewhere where they are useful, also integrated the use of the computing variable each time, making it impossible for the compiler to optimize it out: (TEST 3)

Death Adder's Speed Test.
Please don't touch anything or do anything with the machine until this is done!

Time for int test: 0.080000
Time for float test: 0.250000
Time for double test: 0.240000


no optimization flags where used when compiling. As you can tell, the benchmark you all ran was basically showing you how fast printf() can parse a blank string, and realize the variable it got was bogus. If you add up the numbers from TEST 2 and TEST 3, you get TEST1, which is both. TEST2 shows how much power printf takes by itself, and TEST3 shows the real results of mathematic processing of the CPU.

Unfortunalty, the results are useless. No offense to the original programmer, not trying to be mean or anything, but when I saw it, i had to test it as it didn't make much sense to me.

Ross

opcode1300
09-15-2006, 09:40 AM
Processors Information
------------------------------------------------------------------------------------

Processor 1 (ID = 0)
Number of cores 1
Number of threads 1 (max 1)
Name Intel Celeron 330
Codename Prescott
Specification Intel(R) Celeron(R) CPU 2.66GHz
Package Socket 775 LGA (platform ID = 4h)
CPUID F.4.1
Extended CPUID F.4
Core Stepping E0
Technology 90 nm
Core Speed 3065.9 MHz (20.0 x 153.3 MHz)
Rated Bus speed 613.2 MHz
Stock frequency 2666 MHz
Instructions sets MMX, SSE, SSE2, SSE3
L1 Data cache 16 KBytes, 8-way set associative, 64-byte line size
Trace cache 12 Kuops, 8-way set associative
L2 cache 256 KBytes, 4-way set associative, 64-byte line size
FID/VID Control no
***********End CPU-Z INFO***********
Output:
.671
.610
.656