[ ] Hinting: people usually type the unicode characters, that means those unicode characters in the domain name is gonna be "close" together number-wise, so this means, we can remove a bunch of possibilities by using the "last mapped character" as a hint to reduce the span of search algorithm
[x] Packing Mappings: There are mappings in the table that are sequential, meaning the next mapping's value is gonna be the current's mapping's value plus one; we can use this to reduce the size of the table.
[ ] Indexing: Indexing the table and creating a new array that will let us to reduce the span of the searching.
There are 3 ways I can suggest for optimization: