Closed Manishearth closed 6 years ago
r? @unclenachoduh cc @zbraniecki
This will require cargo regenerate-fixtures
and cargo regenerate-fixtures-within
- https://github.com/unclenachoduh/pluralrules/blob/master/make_pluralrules/.cargo/config
Contributes to #14
Totals | |
---|---|
Change from base Build 105: | 0.03% |
Covered Lines: | 542 |
Relevant Lines: | 603 |
Thanks for the PR @Manishearth. I updated the fixtures in https://github.com/unclenachoduh/pluralrules/pull/22 so this PR can be closed.
This improves performance of language rule fetching significantly. Not as much as I'd hoped, but 5x isn't too bad.
Instead of a giant
match
(which involves a lot of string comparisons), we use phf-map, which at compile time generates an efficient hash function that we can use with the statically generated map for fast lookup.