崮生(子虚) 98102bc3be perf(gsub): writeChainFormat3 coverage 槽改 writeInt16At 回填
type6 format3 的 coverage 偏移槽原用 allHolders: number[][] + reserveOffset16
闭包模式(每槽 [0] 单元素数组 + patches push + flush 回填)。改为 writeUint16(0)
占位 + covSlotPositions 记录字节位置 + writeInt16At 直接回填(与优化329 subtable
slot 同思路),消除每槽的 [0] 数组分配 + reserveOffset16 闭包。

node --prof 显示 GrowFastSmiOrObjectElements 3.7% + ArrayPrototypePush 3.2%
主来自 writeChainFormat3/serializeChainedContextSubst 的 allHolders grow。
FiraCode subsetGSUB min 0.229→0.216ms(-5.7%),端到端 avg 3.4→2.9ms(-15%),
29 用例输出字节全相同 SSIM 一致。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-25 07:39:09 +08:00
..
2026-04-08 22:05:17 +08:00
2024-08-19 18:10:09 +08:00