4 ms·
I did a much better optimization for musl/freebsd, about 10x smaller, with binary search into a single table of ranges and single exceptions, for both cases, lo
by rurban 6y ago
I did a much better optimization for musl/freebsd, about 10x smaller, with binary search into a single table of ranges and single exceptions, for both cases, lower and upper. A few ifs are better than wasting lots of cache.
https://github.com/rurban/musl/commit/7bcdc7e6e1ed2c4424d70613b8c9580a241fa370 https://github.com/rurban/musl/commit/7bcdc7e6e1ed2c4424d706...
But I'm also trying the automatic data optimization route, because Unicode I'd changing every year. Case mapping is easy, but the changing normalization tables cause minor data structure hickups every year. Working in that here: https://github.com/rurban/optdata https://github.com/rurban/optdata
- huhtenberg 6y agoFrom the first glance, yours is going to be orders of magnitude slower.