Fork me on GitHub

Very quick new release. Davy Wybiral found a bug with numeric.diveq([[1,2],[3,4]],2) and in fixing it, I realized that some of the optimizations in Numeric were not optimal for the modern V8 JIT (I think something must have changed in the last 12 months). This resulted in a significant rewrite of the vector functions such as numeric.add(). On my computer, this resulted in a 33% speedup of the benchmark. The bug that Davy found has also been fixed.

The new version of the numeric.xxxeq() functions (eg. numeric.addeq()) can also now operate on typed Arrays, although I did not see significant performance benefits when I tested it. If you use numeric.addeq() on several different typed Array types, the JIT will realize that numeric.addeq() is polymorphic in your code and the JIT will deoptimize numeric.addeq(). As a result, for best performance it is best to stick to a single Array type throughout your application.

December 20, 2012 at 11:45 pm |

Leave a Reply