These patches improve the performance of the ~t time object formatter. Basically instead of recomputing a string conversion function for the format string each time ~t is used we memoize the function based on the format string and locale. The 'compiled' functions also close over the static results of some CLDR lookups instead of performing them every time.
These patches improve the performance of the
~t
time object formatter. Basically instead of recomputing a string conversion function for the format string each time~t
is used we memoize the function based on the format string and locale. The 'compiled' functions also close over the static results of some CLDR lookups instead of performing them every time.Some benchmark comparisons at https://gist.github.com/samdphillips/395fa1707ba12850e17ed9625e812990