Pretext 實測驗證

Userland text measurement (pure JS) vs DOM getBoundingClientRect

Test 1 — 準確度比較

Pretext layout() 算出的高度 vs 實際 DOM render 的高度,容器寬度 320px。

Test 2 — 效能比較

測量 1000 段不同文字在 4 種寬度下的高度,比較兩種方式的耗時。