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

AtariDreams
Copy link
Contributor

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

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

@AtariDreams
Copy link
Contributor Author

@YOCKOW Can we please run the tests?

@YOCKOW
Copy link
Collaborator

YOCKOW commented Dec 14, 2023

@swift-ci Please test

@YOCKOW
Copy link
Collaborator

YOCKOW commented Dec 14, 2023

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

@YOCKOW
Copy link
Collaborator

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
@AtariDreams
Copy link
Contributor Author

@YOCKOW Fixed! Can we try again?

@parkera
Copy link
Member

parkera commented Jan 4, 2024

@swift-ci test

@YOCKOW
Copy link
Collaborator

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.

None yet

3 participants