Can Javascript actually realize the hardware cache locality gains of Data-Oriented Entity Component Systems (ECS)? Or do heap allocations and V8 pointer indirections erode these benefits? And is WebAssembly (WASM) required to break through these performance ceilings?
Explore this real-time benchmark suite comparing spatial trees against flat Sweep & Prune algorithms across Javascript and WebAssembly.
Hypothesis 1: Is an O(N log N) spatial tree always faster than O(N²) Sweep & Prune?