Of possible interest: fast UTF8 validation

Dmitry Olshansky dmitry.olsh at gmail.com
Wed May 16 16:48:28 UTC 2018


On Wednesday, 16 May 2018 at 15:48:09 UTC, Joakim wrote:
> On Wednesday, 16 May 2018 at 11:18:54 UTC, Andrei Alexandrescu 
> wrote:
>> https://www.reddit.com/r/programming/comments/8js69n/validating_utf8_strings_using_as_little_as_07/
>
> Sigh, this reminds me of the old quote about people spending a 
> bunch of time making more efficient what shouldn't be done at 
> all.

Validating UTF-8 is super common, most text protocols and files 
these days would use it, other would have an option to do so.

I’d like our validateUtf to be fast, since right now we do 
validation every time we decode string. And THAT is slow. Trying 
to not validate on decode means most things should be validated 
on input...





More information about the Digitalmars-d mailing list