Key design decisions that drive performance: Memory: ~667 bytes/entity core, +81% with journaling (tinyop+) Spatial: Grid + type indexes → filters type first, then grid (90% fewer distance calcs) Cache: 128-entry LRU with per-type invalidation (enemy writes don't flush player queries) Views (v3.4): O(1) after first eval, auto-update on changes Persistence: BYO – dump() to JSON, IndexedDB, or your backend
Reproduce on your hardware: node bench.js --expose-gc