News for hackers. Stuff that matters.
Re:How we made Haskell search strings as fast as Rust by theoh on Thursday March 14, 2019 @11:26AM (#19390060)
OK, I've found the gross reason why the 2^16 + 2^20 arithmetic works:

"The Unicode standard permanently reserves these code point values for UTF-16 encoding of the high and low surrogates, and they will never be assigned a character, so there should be no reason to encode them. The official Unicode standard says that no UTF forms, including UTF-16, can encode these code points."

Ugh.

There are no comments on this comment yet.