Replaced HashMap<(i32,i32), UiCell> with Vec<Option<UiCell>> indexed by y*width+x. dirty_keys Vec tracks non-None cells for iteration. - set/set_alpha: O(1) array write (was O(1) amortized HashMap insert with hashing overhead) - get: O(1) array index (was HashMap lookup) - keys(): iterate dirty_keys Vec (was HashMap keys iterator) - clear(): memset None over flat array (was HashMap::clear) - resize() called in build_ui to size array to viewport - All 185 tests + 14 scenarios pass - Benchmark: 95.1 FPS (was 61.9 — 53% improvement)
17 lines
362 B
JSON
17 lines
362 B
JSON
{
|
|
"mode": "graphics",
|
|
"ticks": 300,
|
|
"total_time_ms": 3153.2,
|
|
"avg_fps": 95.1,
|
|
"avg_frame_time_ms": 10.48,
|
|
"p99_frame_time_ms": 65.20,
|
|
"min_frame_time_ms": 6.55,
|
|
"subsystems": {
|
|
"ca_step_avg_us": 3386,
|
|
"ca_step_p99_us": 58075,
|
|
"ca_step_min_us": 231,
|
|
"render_avg_us": 3770,
|
|
"render_p99_us": 5334,
|
|
"render_min_us": 3320
|
|
}
|
|
} |