perf: GUID cache with destruction hook, remove glyph cache

GUID lookup cache: 4096-entry direct-mapped with proper invalidation.
MoveObjectToDeletedList (0x464920) hook evicts entries AFTER the
original runs (prevents re-caching from internal FindObjectByGUID call).
DestroyObjectManager (0x467700) hook flushes on zone change/logout.
93% hit rate, 1.15x speedup on FindObjectByGUID (10K+ calls/frame).

Glyph shadow cache removed: game has internal glyph cache at
GetOrCreateCharacterGlyph (0x5CA2D0). Our hook only saw cache misses
(~30/frame), providing no benefit. The 3.65% perf profile was the
game's own hash table work, not redundant computation.

Standalone guidcache module for isolated testing.
This commit is contained in:
MarcelineVQ
2026-03-26 04:14:34 -07:00
parent 1f318a8565
commit bf5a7aa624
4 changed files with 189 additions and 31 deletions
+1
View File
@@ -34,6 +34,7 @@ const module_list = [_]ModuleDesc{
.{ .name = "ssemaths", .desc = "Enable UnitXP x87 math polyfill replacements (SSE)", .default = false },
.{ .name = "silicon", .desc = "Enable SSE2 math replacements (ported from libSiliconPatch)", .default = false },
.{ .name = "weirdperformance", .desc = "Enable production performance optimizations (SSE, inflate, filecache, timer)", .default = true },
.{ .name = "guidcache", .desc = "Enable GUID lookup cache (standalone test)", .default = false },
};
pub fn build(b: *std.Build) void {