A while ago — though by current standards that already feels like ancient history — Twitter was loud with discussion of Pretext.js , a text-layout library whose headline claim is dramatic speedup over standard DOM measurement. Instead of letting the browser's layout engine compute text dimensions, it does the equivalent work in pure JavaScript on top of data prepared once via prepare() . The result, in theory, is no force-reflow on every measurement. Demos from different people looked impressive, so I got curious about how fast this actually is in practice. There was just one detail: I'm not particularly good at performance measurement. Outside of basic Core Web Vitals work — LCP, INP, the usual suspects — I had no real experience with this kind of micro-benchmarking. I started reading about how these measurements are actually done, and concluded that I should begin with the simplest possible test: comparing single-call costs across three strategies — DOM, Canvas, Pretext.…