I think there might be an underestimation of how
expensive matrix operations like inverse and multiply are.
A 4x4 matrix multiplication involves:
32x fetching of the value from a buffer (likely float32) and
converting to native JS doubles.
64x double multiplications
60x double additions
16x converting a double to the target buffer
So 48x double conversions and 124 double mathops.
A 4x4 inversion by gaussian elimination involves:
16x fetching of the value from a buffer,
converting to native JS doubles
32x double multiplication, 14x double subtraction
and 2x double addition to compute the determinant
64x double multiplication, 32x double addition and
32x double subtraction
16x store to buffer conversion
So 32x double conversion and 176 double mathops.
Those are not insignificant amounts of math in JS,
it's not even insiginificant if somehow magically the compiler
would convert it all to straightforward native code.