X2 Matrix vs GL Matrix2 Rotations

JavaScript performance comparison

Revision 2 of this test case created by Daniel Haehn

Preparation code

<script src='http://sandbox.goxtk.com/x2/x2.js'>
</script>
<script src='http://sandbox.goxtk.com/x2/gl-matrix-min.js'>
</script>
<script src='https://raw.github.com/mrdoob/three.js/master/build/three.min.js'></script>

Preparation code output

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
X2 Matrix
//var m1 = X.Matrix.identity();
var v1 = X.Vector.create(1, 2, 3);
//X.Vector.normalize(v1, v1);
//X.Matrix.rotate(m1, Math.PI / 2, v1[0], v1[1], v1[2]);
pending…
GL Matrix2
//var m1 = mat4.create();
var v1 = vec3.fromValues(1, 2, 3);
//mat4.rotate(m1, m1, Math.PI / 2, v1);
pending…
three.js
//var m1 = new THREE.Matrix4();
var v1 = new THREE.Vector3(1, 2, 3);
//m1.rotateByAxis(v1, Math.PI/2);
pending…

Compare results of other browsers

Revisions

You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:

0 comments

Add a comment