-
Notifications
You must be signed in to change notification settings - Fork 779
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
Adds conversion between SystemTime and datetime #3736
Conversation
CodSpeed Performance ReportMerging #3736 will degrade performances by 11.37%Comparing Summary
Benchmarks breakdown
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the slow review on my side here. Overall this makes sense and is well implemented, thanks!
My main thing I wonder is about the timestamp accuracy. If there's a range where the floating-point APIs are accurate enough, we might want to consider using that, as it's probably faster than going through an intermediate timedelta
.
Thank you for your review!
That's a great point. Indeed for Python -> Rust getting a flowing point timestamp (with a Python function call there is no function in the C API for that) might work better. For the Rust -> Python code the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me, sorry for the slow review cycles on this one.
Would you be ok if I leave the implementation as it is with a TODO to investigate using timestamps directly for a possible speedup?
Yes, I think that makes sense; given the edge cases around the use of timestamps I think it makes sense that we get this base known-good implementation in, and can review the performance enhancement in its own diff.
No description provided.