[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

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..

   transposedMatrix = transpose(originalMatrix);

   transposedMatrix = new CanvasMatrix(originalMatrix);

How do you compare those 2 libraries? They meet different usage styles?