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

Small changes #780

Merged
merged 3 commits into from
Nov 20, 2024
Merged

Small changes #780

merged 3 commits into from
Nov 20, 2024

Conversation

anonrig
Copy link
Member

@anonrig anonrig commented Nov 17, 2024

Small changes.

@anonrig anonrig requested review from lemire and jasnell November 17, 2024 02:22
input.begin(), std::ranges::find_if(input, [character_set](const char c) {
return character_sets::bit_at(character_set, c);
}));
const char* data = input.data();
Copy link
Member

Choose a reason for hiding this comment

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

I am not opposed to this change, @anonrig, but did you determine that it was worth doing? This seems significantly more complicated than what we had. It is fine if it is worth it...

Copy link
Member Author

Choose a reason for hiding this comment

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

It is not noticable due to the complexity of Ada, but the instruction count should have been lower with the new implementation. Do you see different/worse results?

Copy link
Member

Choose a reason for hiding this comment

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

Ok. I am not going to check. I expect that it will save instructions especially on long inputs (say a 2x saving) and hopefully make things a bit faster.

include/ada/unicode-inl.h Outdated Show resolved Hide resolved
Co-authored-by: Daniel Lemire <[email protected]>
@anonrig anonrig merged commit c3cbb51 into main Nov 20, 2024
27 of 28 checks passed
@anonrig anonrig deleted the yagiz/small-fixes branch November 20, 2024 23:57
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.

2 participants