[TypeInfo] Use a hash table for faster fromName TypeInfo creation
This reuses the code from propertyInfo, and is also covered by the existing unit tests. The old lookup was O(n) (n: number of types), while the new one is O(1). The new code is at least slightly faster, but may be several times (4x) faster, more so when additional new types are added. Benchmark results (old: prior to this series, *: with earlier changes in this series, new: this code): time [usecs] per iteration archive spreadsheet folder -- benchmarkTypeInfoFromName -- old: 0.450 2.30 3.40 *: 0.039 0.097 0.110 new: 0.028 0.034 0.029
parent
9671deef
Please register or sign in to comment