Emil
b52798c634
perf: UiLayer HashMap → flat Vec array — 62 FPS → 95 FPS
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)
2026-06-22 13:32:47 +03:00
..
2026-06-21 10:34:28 +03:00
2026-06-21 23:38:33 +03:00
2026-06-21 22:27:20 +03:00
2026-06-22 13:32:47 +03:00
2026-06-21 22:27:20 +03:00
2026-06-21 16:09:45 +03:00
2026-06-21 22:27:20 +03:00
2026-06-21 22:27:20 +03:00
2026-06-21 22:27:20 +03:00
2026-06-21 16:09:45 +03:00
2026-06-21 22:27:20 +03:00
2026-06-22 08:55:40 +03:00
2026-06-21 16:09:45 +03:00
2026-06-21 22:27:20 +03:00
2026-06-21 22:27:20 +03:00
2026-06-21 22:27:20 +03:00
2026-06-21 16:09:45 +03:00
2026-06-21 22:27:20 +03:00
2026-06-21 22:27:20 +03:00
2026-06-21 16:09:45 +03:00
2026-06-22 13:32:47 +03:00
2026-06-21 16:09:45 +03:00
2026-06-21 16:09:45 +03:00
2026-06-21 16:09:45 +03:00
2026-06-21 22:27:20 +03:00