|
|
|
|
|
by vvanders
3386 days ago
|
|
> simple values So does every other language, where it matters is with objects. Until I can mark a whole object as a value type and fix it in memory relative to other objects then you'll pay a 10-50x slowdown for cache misses and the like. |
|
But you don't even need to rely on that. JS has TypedArrays[0] which are basically just a chunk of memory you can read and write to.
Aside from some bounds checking, it's about as "low level" as you can get. Sounds like exactly what you are looking for.
[0] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Type...