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

Tweak clear and truncate length modifications #700

Merged
merged 1 commit into from
Apr 26, 2024
Merged

Conversation

Darksonn
Copy link
Contributor

As mentioned in #699 (review).

Also changes truncate to use <=. It is a no-op in that case, but I'm thinking that doing the write in that case would improve branch prediction on this branch. I think that the vast majority of callers will always pass a length that is <= self.len().

cc @paolobarbolini

Copy link
Contributor

@braddunbar braddunbar left a comment

Choose a reason for hiding this comment

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

👏

@Darksonn Darksonn merged commit cb7f844 into master Apr 26, 2024
15 checks passed
@Darksonn Darksonn deleted the alice/clear-setlen branch April 26, 2024 07:24
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