Wondering how typically a unicode code point lookup table is done. That is, given a character such as a
, return U+24B6
, or vice versa. Wondering if there are any efficient tricks so that it doesn't just boil down to:
a: U+24B6
b: ...
c: ...
Which would take up a lot of file size (and memory). Maybe there is a compact way to represent it in a file (not sure if that's what this is doing), which then gets expanded to a larger memory at runtime.
for x in y:
map[x | something] = U + x + 123
Or maybe there is a way to keep it minimal even at runtime, so it is dynamically computed somehow.