cpu benchmark

hello again.

For those whose browser I killed: I have a reason for you to try again.
The little program spits out some results, compared to my Q6600.
One minute ago the results for me were 40% higher than in my IDE, so this is just a vague guess if your cpu is fast or not.
The most interesting bit is the ultra slow BufferedImage when you change the underlying raster, only 181 fps for me poor software renderer.
Would be nice if some results came in :slight_smile:

You find the button in the top left corner again.

#####################################################################################
# score:139.23                                                                      #
# Windows Vista@6.0 java version: 1.6.0_11                                          #
# rounds:11                                                                         #
# benchmark                                     now avg/min/max/variance me  %      #
# 1 mio adds [array access]                     289 312/289/322/99       184 157.07 #
# 100k add,mul,div,%                            487 509/487/515/77       363 134.16 #
# 1 mio adds [live random numbers]              222 254/222/262/127      173 128.32 #
# 100k Math.sin                                 230 236/226/240/18       158 145.57 #
# Sytem.arraycopy of 1 mio int                  510 540/510/564/328      413 123.49 #
# 800x600 BufferedImage blits (changing raster) 182 181/181/182/0        186 97.85  #
#####################################################################################

On my EEEPC 701 4G (Linux, Java 1.5), the applet doesn’t even start (but kills the browser (Firefox 3.0)):


Java Plug-in 1.5.0_10
Verwendung der JRE-Version 1.5.0_10 Java HotSpot(TM) Client VM
Home-Verzeichnis des Benutzers = /home/user

.....

timinginfo   385 ms, ready at  1.13 loading: textures textures.txt           [kdk.textures.n]
timinginfo  1640 ms, ready at  1.64 simpleinit()                             [kdk.aa]
java.lang.ClassCastException: sun.awt.image.DataBufferNative
	at kdk.bx.n(kAi:404)
	at kdk.bq.c(kAi:22)
	at kdk.bq.<init>(kAi:65)
	at kdk.ak.b(kAi:47)
	at kdk.dope.m.setSize(kAi:876)
	at kdk.dope.m.<init>(kAi:120)
	at kdk.dope.m.<init>(kAi:133)
	at kdk.dope.j.<init>(kAi:23)
	at kdk.aa.a(kAi:432)
	at kdk.bf.start(kAi:184)
	at sun.applet.AppletPanel.run(AppletPanel.java:418)
	at java.lang.Thread.run(Thread.java:595)


#####################################################################################
# score:152.98                                                                      #
# Windows XP@5.1 java version: 1.6.0_11                                             #
# rounds:15                                                                         #
# benchmark                                     now avg/min/max/variance me  %      #
# 1 mio adds [array access]                     325 323/320/326/2        184 176.63 #
# 100k add,mul,div,%                            511 514/509/524/15       363 140.77 #
# 1 mio adds [live random numbers]              262 260/259/262/0        173 151.45 #
# 100k Math.sin                                 239 238/237/240/1        158 151.27 #
# Sytem.arraycopy of 1 mio int                  409 420/409/429/49       413 99.03  #
# 800x600 BufferedImage blits (changing raster) 368 365/358/368/8        186 197.85 #
#####################################################################################
MAIN * WARNING * 02/02/2009 17:01:04 gamecow.collectionplayer.d.a:positioner

Q6600 @ 2.4Ghz
About 13 iterations (Oh… 15)

could you please try again? I’m pretty sure it will work this time, I made a stupid cast. Bitttte!

wasn’t there a post by h3ckboy why it is called cpu benchmark? I didn’t delete it. It wasn’t me.

Intel® Core™2 Duo CPU E6750 @ 2.66GHz
4GB ram

#####################################################################################

score:145.73

SunOS@5.11 java version: 1.6.0_10

rounds:10

benchmark now avg/min/max/variance me %

1 mio adds [array access] 323 343/323/355/157 184 175.54

100k add,mul,div,% 563 566/563/571/6 363 155.10

1 mio adds [live random numbers] 288 285/271/290/28 173 166.47

100k Math.sin 261 256/210/265/265 158 165.19

Sytem.arraycopy of 1 mio int 398 376/339/416/486 413 96.37

800x600 BufferedImage blits (changing raster) 179 210/179/241/466 186 96.24

#####################################################################################

Athlon64 X2 2.4GHz
Onboard Nvidia GeForce graphics

#####################################################################################
# score:167.68                                                                      #
# Linux@2.6.27-9-generic java version: 1.6.0_10                                     #
# rounds:11                                                                         #
# benchmark                                     now avg/min/max/variance me  %      #
# 1 mio adds [array access]                     544 526/486/555/352      184 295.65 #
# 100k add,mul,div,%                            916 844/419/916/20990    363 252.34 #
# 1 mio adds [live random numbers]              508 491/388/508/1086     173 293.64 #
# 100k Math.sin                                 93  170/93/180/605       158 58.86  #
# Sytem.arraycopy of 1 mio int                  261 253/239/269/56       413 63.20  #
# 800x600 BufferedImage blits (changing raster) 64  63/62/65/0           186 34.41  #
#####################################################################################

Mightily different results from everyone else. Fast array access and basic ops, but slow as a dog at arraycopy and sin operations. Maybe is a 64-bit thing.

And the variance calculation here seems to be a bit off too ???

don’t think so, the differences from avg are squarred

Right, my mistake. And you can get zeros because of integer rounding. Silly Jono.

######################################################################################
# score:166.76                                                                       #
# Windows Vista@6.0 java version: 1.6.0_11                                           #
# rounds:8                                                                           #
# benchmark                                     now  avg/min/max/variance me  %      #
# 1 mio adds [array access]                     324  325/318/329/11       184 176.09 #
# 100k add,mul,div,%                            1217 1191/1122/1217/1099  363 335.26 #
# 1 mio adds [live random numbers]              274  272/266/274/6        173 158.38 #
# 100k Math.sin                                 250  249/246/251/2        158 158.23 #
# Sytem.arraycopy of 1 mio int                  374  369/352/375/77       413 90.56  #
# 800x600 BufferedImage blits (changing raster) 171  168/161/171/11       186 91.94  #
######################################################################################

Works fine now (CPU is CeleronM@630Mhz):


####################################################################################
# score:26.73                                                                      #
# Linux@2.6.21.4-eeepc java version: 1.5.0_10                                      #
# rounds:2                                                                         #
# benchmark                                     now avg/min/max/variance me  %     #
# 1 mio adds [array access]                     66  58/50/66/64          184 35.87 #
# 100k add,mul,div,%                            113 112/112/113/0        363 31.13 #
# 1 mio adds [live random numbers]              50  48/47/50/2           173 28.90 #
# 100k Math.sin                                 55  55/55/55/0           158 34.81 #
# Sytem.arraycopy of 1 mio int                  92  92/92/93/0           413 22.28 #
# 800x600 BufferedImage blits (changing raster) 22  23/22/25/2           186 11.83 #
####################################################################################


yay :slight_smile:
considering your result, maybe you could even play (my future) software rendered games with decent speed if the screen is scaled to your 480 pixel height monitor!

edit: oops I cheated and let the thing run while my browser was minimized. New results are from keeping the applet up and focused for the whole time.

Intel Core 2 Duo E8400 3.0Ghz


######################################################################
# *****************                                                  #
# * score: 208.33 *                                                  #
# *****************                                                  #
# Windows Vista@6.0 java version: 1.6.0_11                           #
# rounds:10                                                          #
# benchmark                                     avg/min/max/variance #
# 1 mio adds [linear array access]              404|403|405|0        #
# 1 mio adds (random array access a[b[a[i]]]    160|160|161|0        #
# 100k add,mul,div,%                            1443|1438|1447|6     #
# 1 mio adds [live random numbers]              324|321|326|1        #
# 100k Math.sin                                 297|295|298|0        #
# Sytem.arraycopy of 1 mio int                  385|371|394|74       #
# 800x600 BufferedImage blits (changing raster) 1130|1120|1141|42    #
######################################################################