This relies on an external file that apparently was generated many many years ago with a long-lost script. The data in there is outdated and not optimized for fast lookup.
This could be replaced by a new generator consuming CLDR data and outputting static data that can be compiled in and allows allocation-free in-place lookup.