about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-11-08 07:06:36 +0000
committerbors <bors@rust-lang.org>2014-11-08 07:06:36 +0000
commitafd657e20724f6a9093e34818c4923aa8601cafb (patch)
tree4736ae898473a619700f6ed3c1273107d4e335ea /src/rustllvm/RustWrapper.cpp
parent7bc3588fafb15669eb92541129c6de773afedd98 (diff)
parent7ddf8cb0e02549e6df7afe7e8486d735f8ee7eae (diff)
downloadrust-afd657e20724f6a9093e34818c4923aa8601cafb.tar.gz
rust-afd657e20724f6a9093e34818c4923aa8601cafb.zip
auto merge of #18556 : seanmonstar/rust/tm-fmt, r=alexcrichton
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.

This runs validation prior to return the created `TmFmt`, catching errors before formatting happens. The specialized formats skip this validation, since we already know they are valid.

[breaking-change]
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions