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 common functions with Neri-Schneider #23

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

DaniPopes
Copy link

@DaniPopes DaniPopes commented Jul 22, 2024

Optimize common.rs by using Neri-Schneider algorithms, as presented in CppNow 2023: https://www.youtube.com/watch?v=0s9F4QWAl-E

There are likely more places where they can be applied, but I just wanted to open this PR for now :)

src/util/common.rs Outdated Show resolved Hide resolved
Comment on lines +87 to +88
let month = month.get();
if (month ^ month >> 3) & 1 == 0 {
Copy link
Author

@DaniPopes DaniPopes Jul 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want me to implement bitwise operations for range int? month.get was also used previously to index into a table.

@DaniPopes DaniPopes requested a review from BurntSushi July 23, 2024 13:52
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.

4 participants