SIMD fixes malformed UTF-16 strings up to 9x faster, already in Chromium and Node 25

lemire · x · 2026-08-26

A new paper by lemire et al.: fixing ill-formed UTF-16 strings (unpaired surrogates replaced by U+FFFD, as JavaScript and Java store strings) using SIMD — ARM NEON and x64 SSE/AVX2/AVX-512. It hits 18.9 GB/s on an Apple M4 and 7.5 GB/s on Intel Ice Lake, at as little as 0.4 instructions per byte, up to 9x faster than the old approach. Shipped in practice: String.prototype.toWellFormed in Node.js 25 is 5x faster, and the code is in Chromium browsers (Chrome, Edge, Brave); a browser benchmark is linked.

Related event: SIMD Repairs Malformed UTF-16 Strings 9x Faster(2 posts)→

Original post →

More from Research

Research channel →