崮生(子虚) 055425e852 perf(gsub): readCoverageRemapped format1 用 Uint16Array 批量读
coverage format1 的 gid 列表是连续 count 个大端 u16,原 DataView.getUint16
逐次调用有边界检查 + 大端组装开销。gid 数组 2 字节对齐时改用 Uint16Array
view 共享 buffer 读取 + 内联翻转 ((raw&0xff)<<8)|(raw>>8)(与 hmtx/loca 同思路),
未对齐回退 DataView。

readCoverageRemapped 是 FiraCode subsetGSUB 第一大热点(75.5%),miss 路径
sum 遍历 ~26000 gid。实测 FiraCode fontSubset 中位数 13.65→12.43ms(-8.9%),
5 轮稳定。基准 SSIM/ink/字节全无回归。

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