Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libtime::Tm::to_utc() is slow even if already utc #18725

Closed
seanmonstar opened this issue Nov 7, 2014 · 3 comments
Closed

libtime::Tm::to_utc() is slow even if already utc #18725

seanmonstar opened this issue Nov 7, 2014 · 3 comments

Comments

@seanmonstar
Copy link
Contributor

Tm.to_utc() calls out to the runtime fn rust_timegm twice, once to convert to a Timespec, and a second time to convert the timespec to a new Tm with offset of 0. If a Tm is already UTC, this should skip both those calls.

@reem
Copy link
Contributor

reem commented Nov 7, 2014

rust_timegm is also very slow, perhaps curiously so. It shows up as almost 60% of the running time of hyper for a hello world server.

@gsingh93
Copy link
Contributor

This should probably be closed or moved to https://github.com/rust-lang/time

@steveklabnik
Copy link
Member

Done! time-rs/time#66

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants