|
|
|
|
|
by kevingadd
1208 days ago
|
|
Also if you wrote the JS equivalent of that, each vector would be 3-4 individually heap-allocated doubles in v8, because they aren't able to allocate floating-point values inline. There would also be a new heap allocation for the result vector itself when performing each operation. The overhead really adds up. :/ At one point Mozilla had a prototype implementation of strongly-typed value types in JavaScript, but it fell by the wayside once WebAssembly became a thing. |
|