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

Optimize the constructors of Time::Span #13807

Merged
merged 2 commits into from
Sep 20, 2023

Conversation

erdian718
Copy link
Contributor

  1. Avoid arithmetic overflow exception.
  2. Remove unnecessary type conversions.
  3. Remove unnecessary normalization.

Closes #13797

src/time/span.cr Outdated Show resolved Hide resolved
Co-authored-by: Quinton Miller <nicetas.c@gmail.com>
@straight-shoota straight-shoota added this to the 1.10.0 milestone Sep 19, 2023
@straight-shoota straight-shoota merged commit 3f283c7 into crystal-lang:master Sep 20, 2023
53 checks passed
@erdian718 erdian718 deleted the opt/time-span-new branch September 21, 2023 04:42
Blacksmoke16 pushed a commit to Blacksmoke16/crystal that referenced this pull request Dec 11, 2023
Co-authored-by: Quinton Miller <nicetas.c@gmail.com>
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optimize the constructors of Time::Span
4 participants