Skip to content

Commit 7ddf8cb

Browse files
committed
libtime: alter strftime to use a TmFmt
The internals of strftime were converted to use a single formatter, instead of creating and concatenating a bunch of small strings. This showed ~3x improvement in the benches. Also, since the formatted time may be going straight to a Writer, TmFmt was introduced, and is returned from all formatting methods on Tm. This allows the saving of another string allocation. Anyone wanting a String can just call .to_string() on the returned value. [breaking-change]
1 parent 6ee56c9 commit 7ddf8cb

File tree

1 file changed

+454
-320
lines changed

1 file changed

+454
-320
lines changed

0 commit comments

Comments
 (0)