mljs / matrix

Matrix manipulation and computation library
https://mljs.github.io/matrix/
MIT License
353 stars 54 forks source link

chore: improve speed #166

Closed lpatiny closed 11 months ago

lpatiny commented 11 months ago

Using this modification the speed is increase from 600 ops/sec to 750 ops/sec in the benchmark/evd test

Of course we skip some test from the specifications about +Infinity and -Infinity.

@targos if you agree with this change I would remove all the Math.abs from the ml-matrix project.

targos commented 11 months ago

You can do this change everywhere. Btw, Infinity and -Infinity are still treated correctly with this implementation

lpatiny commented 11 months ago

After further analysis this does not yield to major improvement.