Faster roof scan and heat pass with identical results (t21)
- The roof is rescanned only in area columns that changed since the last scan: a quiet Huge world goes from 4.60 to 1.88 ms per scan (every 20 ticks). - The heat pass skips react() for solids and powders below their first reaction threshold: Huge world digging 2.54 -> 2.34 ms/tick, quiet 1.39 -> 1.18. - Every suite's output is identical apart from timing lines; seeds make the same worlds. - test/t_sim_optimizations.js checks the dirty roof against a full scan and the heat loop against the reference loop byte for byte. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@
|
||||
function simTick() {
|
||||
tick++;
|
||||
tickStamp = (tickStamp % 255) + 1;
|
||||
if (tick % 20 === 1) updateRoof();
|
||||
if (tick % 20 === 1) updateDirtyRoof();
|
||||
weatherTick();
|
||||
machinesTick();
|
||||
pipesTick();
|
||||
|
||||
Reference in New Issue
Block a user