You actually can lay things out in memory using Typed Arrays.
There's some overhead to reads/writes though (there is memory safety, after all).
There's some overhead to reads/writes though (there is memory safety, after all).
So something like for (x = 0; x < arr.length; x++) {...} can run at pretty much the same speed as C code.