encoding_rs
encoding_rs copied to clipboard
Convert sorted data arrays to the Eytzinger order
The Eytzinger order improved things for Gecko's HTML parser. Data tables that are currently only searched by binary search should probably be converted to the Eytzinger order.
Not sure if you saw this or not but here's rust implementation of Eytzinger-arranged arrays: https://github.com/jonhoo/ordsearch
Thank you. I hadn't seen it.
I'll leave this open in case someone else really cares enough to implement and measure, but
- The hot part of EUC-KR has to remain in its present order.
- Re-sorting the cold parts of EUC-KR and GBK probably doesn't matter much as they are cold parts.
- The label lookup is probably fast enough as-is not to merit active effort on it.