- proudly presents -
The Real-World Browser Benchmark
ClubCompy Version: Engine Family/Version*:   Score: [running, please wait]

About the Real-World Browser Benchmark

Wahoo!  Benchmarks are fun!  They provide a scorecard of how our favorite software performs on the hardware that we love to brag about.

ClubCompy has an interesting software architecture.  ClubCompy presents a fully programmable computer environment to kid programmers, yet it is built only from the severely constrained resources provided by your web browser.  ClubCompy is made with pure JavaScript and HTML5, no Flash or Java required.

ClubCompy offers us a rare opportunity to compare how different browsers perform on different types of workloads and grade how the browser vendors are doing at their turbo-boosting development efforts.  Try ClubCompy on all your different OS'es, browsers, and devices.  Check out what your scores look like, discuss amongst yourselves!  ;)

The Real-World Browser Benchmark is powered by your computer at ClubCompy.com. Hey, did you know that ClubCompy is an innovative new service for kids of all ages to experience the joys of computer programming?  Please help us get the word out on ClubCompy today!


© 2012 Woldrich, Inc.


* As reported by the JQuery browser API


Title Iterations run Theoretical maximum
What we were trying to test
(Intensities on a scale of 0→10)
JavaScript engine optimizations: , DOM and compositor efficiency:
JavaScript memory handling: , Math performance: , JavaScript control flow and context switching: , Raw graphics performance (Effects of fill-rate or hardware acceleration):
Notes
10 REM ** Mandelbrot zoomer
15 REM ** by Dave Woldrich
16 REM ** based on anonymous free sources
20 VWAIT false
30 CLEAR
40 iterTot = 0
50 scrWidth = 40; scrHeight = 30
60 colArray = ARRAY

60 REM ** Input parameters
65 REM ++ indicates zoom area and speed 
70 xMin = -2.72488; yMin = -2.51499
80 xMax = 3.27512; yMax = 3.485001
90 zoomFactor = 0.4333333

100 REM ** Main loop
110 xStart = xMin; yStart = yMin 
120 xEnd = xMax; yEnd = yMax
130 xLen = xEnd-xStart
140 yLen = yEnd-yStart
150 xIncr = xLen / scrWidth
160 yIncr = yLen / scrHeight
170 xRatio = scrWidth / xLen
180 yRatio = scrHeight / yLen
190 GOSUB 1000
200 REM ** update zoom parameters
210 xMid = xMin + xLen / 2
220 yMid = yMin + yLen / 2
230 xLen = xLen * zoomFactor
240 yLen = yLen * zoomFactor
250 xMin = xMid - xLen / 2
260 xMax = xMid + xLen / 2
270 yMin = yMid - yLen / 2
280 yMax = yMid + yLen / 2
290 VWAIT
300 GOTO 100

1000 REM ** draw a screen
1005 ts = Clock.time
1010 x = xStart; xo = 0
1020 y = yStart; yo = 0
1030 GOSUB 2000
1035 iterTot = iterTot + 1
1040 c = FLOOR (iter % 255)
1050 TAG 32, xo, yo, -1, c, 0
1060 y = y + yIncr
1070 yo = yo + 1
1080 IF (yo LT scrHeight) GOTO 1030
1090 te = Clock.time
1100 REM ** avoid unnecessary flip
1110 IF (te - ts LT 33) GOTO 1200  
1120 VWAIT
1200 x = x + xIncr
1205 xo = xo + 1
1210 IF (xo LT scrWidth) GOTO 1020
1220 RETURN

REM ** iterate for a single pixel 
2000 iter = 0
2010 maxIter = 129
2020 aOld = 0
2030 bOld = 0
2040 aSquared = 0
2050 a=x
2060 bSquared = 0
2070 b=y
2080 zSquared = 0
2090 a = aSquared - bSquared + x
2100 aSquared = a * a
2110 b = 2 * aOld * b + y
2115 REM ++ early out test
2120 IF (bOld EQ b AND aOld EQ a) iter = maxIter-1
2130 bSquared = b * b
2140 zSquared = aSquared + bSquared
2150 IF (zSquared GT 4) RETURN
2160 bOld = b; aOld = a
2165 iter = iter + 1
2170 IF (iter LT maxIter) GOTO 2090
2180 RETURN	
	
10 REM ** Bumperbots by Dave!

15 last = 0
16 current = 0
17 samp = ARRAY

20 VWAIT false
30 CLEAR
40 SELECT 1
50 SELECT 0
60 BGCOLOR 191
70 FGCOLOR 0

79 REM ** Build sprite bitmaps
80 GOSUB 1000
85 REM ** Pause until the robot SPMAP is signaled after it loads
86 WAIT roboMap[0][0]

89 REM ** Draw playfield
90 GOSUB 2000
95 VWAIT

100 iterTot = 0
110 iterMax = 1800

198 REM ** Main loop
199 REM ++ Walk our bots forward 
200 k = 0
210 IF (k GTE botCount) GOTO 300
220 WALK Sprite[k], 2.5
230 k = k + 1
240 IF (k LT 256) GOTO 210

299 REM ++ Act if bots are colliding
300 k = 0
310 whichSpr = Sprite[k]
320 IF (sprColl[k] EQ true) GOSUB 4000
330 k = k + 1
340 IF (k LT botCount) GOTO 310

399 REM ++ Every 5th frame, spawn a bot
400 IF (botCount GTE 256) GOTO 420
410 IF ((iterTot % 5) EQ 0) GOSUB 3000
420 iterTot = iterTot + 1
430 VWAIT

435 REM ** Compute and display the frame rate
440 current = Clock.time
450 IF (last EQ 0) GOTO 620
460 diff = current - last
470 samp[LENGTH samp] = diff
480 IF (LENGTH samp GT 20) REMOVE samp, 0
490 i = 0
500 tot = 0
510 tot = tot + samp[i]
520 i = i + 1
530 IF (i LT LENGTH samp) GOTO 510
540 avg = 1000 / tot / LENGTH samp
550 avgS = LEFT (TOSTR avg), 5
560 SELECT 1
570 FGCOLOR Cursor, 192
580 BGCOLOR Cursor, 255
590 MOVE Cursor, 0, 0
600 PRINT 'FPS: ' + avgS + '    '
610 SELECT 0
620 last = current
630 GOTO 200

1000 roboBits = BEGIN ARRAY
1010  DATA 0,0,192,3,0,0
1020  DATA 0,0,124,13,0,0
1030  DATA 0,0,87,53,0,0
1040  DATA 0,192,85,53,254,0
1050  DATA 0,192,85,213,170,3
1060  DATA 0,192,85,213,170,15
1070  DATA 0,0,87,85,174,58
1080  DATA 0,128,87,85,171,14
1090  DATA 0,188,94,245,170,14
1100  DATA 0,171,218,175,170,3
1110  DATA 192,170,190,170,250,0
1120  DATA 192,170,170,170,15,0
1130  DATA 192,170,170,254,0,0
1140  DATA 0,171,254,3,0,0
1150  DATA 0,252,3
1160 END

1200 roboCols = BEGIN ARRAY
1210  DATA 0,7,182,96
1220 END

1240 roboPaint = BEGIN ARRAY
1250  DATA 182,132,233,61
1260  DATA 173,164,91,82,73
1270  DATA 153,69,255,184
1280  DATA 183,113,47
1290 END

1300 roboMap = ARRAY
1310 i = 0
1320 robot = ARRAY
1330 roboCols[1] = 7
1340 roboCols[2] = roboPaint[i]

1350 robot[0] = BEGIN SPMAP
1360  PALETTE roboCols
1370  DATA roboBits
1380 END

1390 roboCols[1] = 63
1400 robot[1] = BEGIN SPMAP
1410  PALETTE roboCols
1420  DATA roboBits
1430 END
1440 roboMap[i] = robot
1450 i = i + 1
1460 IF (i LT 16) GOTO 1320

1490 botCount = 0
1500 RETURN

2000 i = 0
2010 TAG 32, i, 0, 0, -1, 1
2020 TAG 32, i, 29, 0, -1, 1 
2030 TAG 32, i+1, 0, 255, -1, 1
2040 TAG 32, i+1, 29, 255, -1, 1 
2050 i = i + 2
2060 IF (i LT 40) GOTO 2010
2100 i = 0
2110 TAG 32, 0, i, 0, -1, 1
2120 TAG 32, 39, i, 0, -1, 1 
2130 TAG 32, 0, i+1, 255, -1, 1
2140 TAG 32, 39, i+1, 255, -1, 1 
2150 i = i + 2
2160 IF (i LT 30) GOTO 2110

2200 sprColl = ARRAY
2210 i = 0
2220 sprColl[i] = false
2230 i = i + 1
2240 IF (i LT 256) GOTO 2220

2300 RETURN

3000 mapIdx = botCount % 16
3010 whichMap = roboMap[mapIdx][0]
3020 whichSpr = Sprite[botCount]
3030 startX = (RANDOM * 280) + 8
3040 startY = (RANDOM * 200) + 8
3050 MOVE whichSpr, startX, startY
3060 SHOW whichSpr, 1, whichMap, 1
3070 botCount = botCount + 1
3080 FACE whichSpr, RANDOM * 360
3090 FLIP whichSpr, FLOOR RANDOM * 2, 0

3310 LISTEN whichSpr
3320  sprColl[whichSpr.id] = false
3330  j = 0
3340  IF (whichSpr.coll[j]) GOTO 3380
3350  j = j + 1
3360  IF (j LT 32) GOTO 3340
3370  GOTO 3400
3380  sprColl[whichSpr.id] = true
3400  IF (NOT whichSpr.ccoll) RETURN
3410  sprColl[whichSpr.id] = false
3420  x1 = 160; y1 = 120
3430  x2 = whichSpr.x; y2 = whichSpr.y
3440  dy = y2-y1; dx = x2-x1
3450  ang = ATAN2 dy, dx
3460  IF (ang LT 0) ang = ang + 360
3470  ang = ang - 90
3480  FACE whichSpr, ang
3490 END

3500 RETURN

4000 FACE whichSpr, RANDOM * 360
4010 mapIdx = whichSpr.id % 16
4020 whichMap = roboMap[mapIdx][RANDOM * 2]
4030 SHOW whichSpr, 1, whichMap
4040 RETURN
	
	
10 REM ** Draw the Golden Ratio
5 VWAIT false
10 CLEAR
11 VWAIT
12 iterTot = 0
22 iterMax = 1800
25 color = 0
27 lastFrame = Clock.time

30 iterTot = iterTot + 1
40 xmin  =   0; xmax = 320
50 ymin  =   0; ymax = 240
60 color = ((color + 7) % 256)
70 GOSUB 1000
72 VWAIT
74 lastFrame = Clock.time
76 CLEAR
80 BGCOLOR color
90 xmin = 160
92 color = (color + 15) % 256
94 GOSUB 1000

100 REM ** decrement ymax
110 GOSUB 1100
120 color = (color + 15) % 256
130 GOSUB 1000

140 REM ** decrement xmax
150 GOSUB 1200
160 color = (color + 15) % 256
170 GOSUB 1000

180 REM ** decrement ymin
190 GOSUB 1300
200 color = (color + 15) % 256
210 GOSUB 1000

220 REM ** decrement xmin
230 GOSUB 1400
240 color = (color + 15) % 256
250 GOSUB 1000

260 REM ** decrement ymax
270 GOSUB 1100
280 color = (color + 15) % 256
290 GOSUB 1000

300 REM ** decrement xmax
310 GOSUB 1200
320 color = (color + 15) % 256
330 GOSUB 1000

340 REM ** decrement ymin
350 GOSUB 1300
360 color = (color + 15) % 256
370 GOSUB 1000

380 REM ** decrement xmin
390 GOSUB 1400
400 color = (color + 15) % 256
410 GOSUB 1000

420 REM ** decrement ymax
430 GOSUB 1100
440 color = (color + 15) % 256
450 GOSUB 1000

460 REM ** decrement xmax
470 GOSUB 1200
480 color = (color + 15) % 256
490 GOSUB 1000

500 REM ** decrement ymin
510 GOSUB 1300
520 color = (color + 15) % 256
530 GOSUB 1000

540 REM ** decrement xmin
550 GOSUB 1400
560 color = (color + 15) % 256
570 GOSUB 1000

580 REM ** decrement ymax
590 GOSUB 1100
600 color = (color + 15) % 256
610 GOSUB 1000

620 REM ** decrement xmax
630 GOSUB 1200
640 color = (color + 15) % 256
650 GOSUB 1000

840 GOTO 30

1000 REM ** Fill from xmin -> xmax, ymin -> ymax with color
1010 PENCOLOR color
1020 xpos = xmin
1030 MOVE xpos, ymin
1040 PENDOWN
1050 MOVE xpos, ymax
1060 PENUP
1070 xpos = xpos + 0.25
1080 IF (xpos GTE xmax) RETURN
1090 IF (Clock.time - lastFrame LTE 33) GOTO 1030 
1092 VWAIT
1094 lastFrame = Clock.time 
1096 GOTO 1030

1100 REM ** decrement ymax
1110 ydelt = ymax - ymin
1120 ydelt = ydelt / 2
1130 ymax  = ymax - ydelt
1140 RETURN

1200 REM ** decrement x
1210 xdelt = xmax - xmin
1220 xdelt = xdelt / 2
1230 xmax  = xmax - xdelt
1240 RETURN

1300 REM ** decrement ymin
1310 ydelt = ymax - ymin
1320 ydelt = ydelt / 2
1330 ymin  = ymin + ydelt
1340 RETURN

1400 REM ** decrement xmin
1410 xdelt = xmax - xmin
1420 xdelt = xdelt / 2
1430 xmin  = xmin + xdelt
1440 RETURN
	
	
5 REM ** test canvas pattern performance - part 1
6 REM ** by Dave
7 VWAIT false
8 CLEAR
9 VWAIT
10 iterTot = 0
11 iterMax = 540000
12 fc = 0

13 REM ** Main loop
15 FGCOLOR (fc % 256)
20 BGCOLOR 255
30 lastFlip = Clock.time
40 y = 0
50 x = 0
60 TAG 178, x, y, Cursor.fgcol
65 iterTot = iterTot + 1
70 x = x + 1
80 IF (x LT 40) GOTO 60
84 REM + this next line will force batched characters to render
85 HIDE Turtle
90 IF (Clock.time - lastFlip LT 33) GOTO 120
100 VWAIT
110 lastFlip = Clock.time
120 y = y + 1
130 IF (y LT 30) GOTO 50
140 fc = fc + 7

150 VWAIT
160 CLEAR
170 GOTO 15
	
	
5 REM ** test canvas pattern performance - part 2
6 REM ** by Dave
7 VWAIT false
8 CLEAR
9 VWAIT
10 iterTot = 0
11 iterMax = 540000
12 fc = 0

13 REM ** Main loop
15 FGCOLOR (fc % 256)
20 BGCOLOR 255
30 lastFlip = Clock.time
40 y = 0
50 x = 0
60 TAG 32, x, y, Cursor.fgcol, -1, 1
65 iterTot = iterTot + 1
70 x = x + 1
80 IF (x LT 40) GOTO 60
84 REM + this next line will force batched characters to render
85 HIDE Turtle
90 IF (Clock.time - lastFlip LT 33) GOTO 120
100 VWAIT
110 lastFlip = Clock.time
120 y = y + 1
130 IF (y LT 30) GOTO 50
140 fc = fc + 7

150 VWAIT
160 CLEAR
170 GOTO 15