Originally from jsperf webgl-math-library-comparisson
A comparisson of several math / vector libraries to be used against webgl. The test is intended to help select the fastest library to use for webgl projects.
Libraries Tested:
Closure / goog.math, gl-matrix, N3D, Sylvester, vanilla js
These results show that the allocation of small temporary objects is practically free in modern browsers. Arrays are still much slower though.
With this in mind, an ideal modern webgl math library should use immutable objects for each function call and then have a final conversion to Float32Array function only used when assigning the result to WebGL since allocating ArrayBuffers is also extremely slow.
Comparing performance of: Vanilla vs glmatrix vs ES6 class vs No Array vs N3D vs Closure