-
Notifications
You must be signed in to change notification settings - Fork 173
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
Calendar benchmarks #1887
Calendar benchmarks #1887
Conversation
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 good so far
@zbraniecki or @sffc, want to have a second look at these?
I'm noticing some possible bad behavior from benchmarking |
Updated to use more generic functions where possible (thank you @Manishearth for the guidance!). Of note, there were some cases that led to some specific cases being built, violating DRY:
|
I think we should aim for consistency across calendars here, and either everyone gets this API or nobody does. Given that DateTimes are easily mutated I somewhat prefer the latter. |
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.
Overall looks good, I think we should have the construction APIs for datetimes be largely consistent and not deal with nanoseconds, aside from that should be almost ready to merge!
What's the best way to open this discussion? Should I open an issue to decide on adding/removing nanoseconds? |
Honestly I'd be fine with the change being made in this PR itself to make your benchmarks simpler (these are new APIs, it's fine) but we could do it separately if you'd like, I'd just file an issue. |
Happy to make the change to nanoseconds directly in this PR! To confirm, I will be removing all |
Correct! We should construct datetimes with h/m/s and nothing more, folks can tack on ns if they really need after the fact |
|
I'd switch that one over too, remember that the nanoseconds field is public and you can mutate it after the fact. But if you really want you could also make a |
This needs to have merge conflicts fixed and then can be merged |
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.
LGTM but I think the comment in the dependencies file is obsolete now
Great work! |
Fixes #1791
Changes:
Date
andDateTime
new_gregorian_datetime_from_integers
-->new_gregorian_datetime
to bring in-line with all other calendarsicu_datetime
toicu_datetime
[dev-dependencies]
. Without this,icu_datetime
tests cause compiler errordelayed_good_path_bugs
on my setup. This is the case even onmain
branch currently. See AddDate::new_from_iso(date_iso, X)
example for each calendar X #1844 (comment) for same happening onicu_calendar
.