[Public WebGL] JavaScript matrix libraries really 5x faster in Minefield than Chrome?

Gregg Tavares (wrk) [email protected]
Mon Feb 14 10:39:30 PST 2011


So I went looking as to why certain functions where faster in other
libraries than the one I use. Not that I expect the one I use to be the
fastest but I'm happy to optimize it. But, here's another example of apples
vs oranges.

The CanvasMatrix library transposes matrices in place. That means it only
has to swap 6 pairs of values.
The TDL math library always creates a new matrix

So, the question is which is faster? Well, that depends on usage. If I need
both the transpose and the untransposed matrices then in CanvasMatrix
library I'll also need to  copy the matrix. In other words in pseudo code..

   tdl:
   transposedMatrix = transpose(originalMatrix);

   CanvasMatrix:
   transposedMatrix = new CanvasMatrix(originalMatrix);
   transposedMatrix.transpose();

How do you compare those 2 libraries? They meet different usage styles?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://khronos.org/pipermail/public_webgl_khronos.org/attachments/20110214/36a4e695/attachment.html>


More information about the public_webgl mailing list