f35f56b9705848a58d05d45c01c88ade1d8730bf
- Cache active_chunks(): one allocation instead of 5 per tick - heat_transfer/gas_step/pressure_step: direct chunk array access (chunk.temps[idx], chunk.gas_*[idx], chunk.pressure[idx]) instead of grid.get_temp()/set_temp() (eliminates 5 chunk-lookups per cell) - In-place updated_this_tick reset via get_chunk_mut (no Cell copy, no mark_dirty) - light_step: gather sources first (one pass), skip if no sources, reduced radius (lava 25→12, fire 15→6), frequency 10→20 ticks - gas_step: skip chunks with no gas (gas_density all 0) - pressure_step: skip chunks with all atmospheric (128), add mark_dirty - pre_dirty: HashMap instead of Vec (O(1) lookup vs O(n) linear search) - Cross-chunk heat transfer: edge_temps pre-loaded before mutable borrow - Spread chunk save I/O: 1 chunk/tick instead of all every 60 ticks - All 185 tests + 14 scenarios pass - Benchmark: 82.7 FPS avg, p99 86ms (was 18 FPS, p99 442ms)
Languages
Rust
98.6%
GLSL
1%
Python
0.4%