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

Make isleap faster #4852

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Make isleap faster #4852

wants to merge 1 commit into from

Conversation

AreaZR
Copy link
Contributor

@AreaZR AreaZR commented Dec 11, 2023

The assembler generated is better if we compare directly instead of doing fancy ring buffer-eque logic.

Proof:
https://godbolt.org/z/dferPP9h4

@AreaZR
Copy link
Contributor Author

AreaZR commented Dec 12, 2023

@YOCKOW Can we please run the tests?

@YOCKOW
Copy link
Member

YOCKOW commented Dec 14, 2023

@swift-ci Please test

@YOCKOW
Copy link
Member

YOCKOW commented Dec 14, 2023

@parkera Can we merge CF-only change for perf here?

@YOCKOW
Copy link
Member

YOCKOW commented Dec 15, 2023

Tests failed because original isleap seems to expect that year is the actual year minus 1, and new isleap doesn't seem to detect leap years.
https://godbolt.org/z/cad119qrG

The assembler generated is better if we compare directly instead of doing fancy ring buffer-eque logic.

Proof:
https://godbolt.org/z/dferPP9h4
@AreaZR
Copy link
Contributor Author

AreaZR commented Dec 16, 2023

@YOCKOW Fixed! Can we try again?

@parkera
Copy link
Contributor

parkera commented Jan 4, 2024

@swift-ci test

@YOCKOW
Copy link
Member

YOCKOW commented Jan 5, 2024

I wonder why Linux test has passed because I think new implementation has to be changed as I suggested above🤔

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

Successfully merging this pull request may close these issues.

3 participants