simple js benchmark

I’ve tried to find the better way for constructing a really fast matrix computation, so I’ve tried to compare different methods here is my own results:

Chromium 5.0.316.0 (37992)
163 ms array
623 ms webgl array
98 ms var
131 ms object
3183 ms class :shock:

Gecko/20100202 Minefield/3.7a1pre
496 ms array
87 ms webgl array 8)
74 ms var
418 ms object
471 ms class

The test was to add 1.0 to any component of a 4x4 matrix for 1000000 times using various methods:
array is a 16 element array [1, 2, 3…].
webgl array is a WebGLFloatArray constructed using the same array as before.
var is a set of global vars m11, m12…m44.
object is an object {m11, m12…m44}
class is like object defined in a class Matrix with m11…m44 as attributes, then instanced as global mat = new Matrix();

It’s really interesting as how is Minefield fast using WebGLArrays :mrgreen: