X2 Matrix vs GL Matrix2 Rotations

JavaScript performance comparison

Revision 7 of this test case created by 1Pupik1989

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>
<script src="https://raw.github.com/1Pupik1989/N3D/master/source/N3D.min.js"></script>
<script type="text/javascript">
N3D.require("Math.Matrix4","Math.Vector3");
</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 = new X.Vector(1, 2, 3);
v1.normalize();
X.Matrix.rotate(m1, Math.PI / 2, v1.x, v1.y, v1.z);
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…
N3D
var v1 = new $V3(1,2,3);
var m1 = $M4.CreateRotationAroundAxis(Math.PI/2,v1);
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