You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Memoize digitsRegex
Profiles reveal that a substantial portion of fromFormat time is spent
in digitsRegex. It is only called from unitsForToken and it is always
called with 11 suffixes to match different numbers of digits.
There are 21 numbering systems, so a fully expanded cache would hold
11*21 = 231 regexes.
Benchmarks show about a 1.5x improvement on DateTime.fromFormat
* Allow digitRegex cache to be reset
0 commit comments