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

fn small_memset: Remove the unused UP_TO == 64 case #1314

Merged
merged 1 commit into from
Jul 14, 2024

Conversation

nnethercote
Copy link
Contributor

It's never hit (I tried replacing the *as_array(buf) = [val; 64] arm with a panic and the tests all passed). This makes sense because the original C code only had upto values of 16 and 32.

It's never hit (I tried replacing the `*as_array(buf) = [val; 64]` arm
with a panic and the tests all passed). This makes sense because the
original C code only had `upto` values of 16 and 32.
@kkysen kkysen self-assigned this Jul 14, 2024
@kkysen kkysen changed the title Remove the UP_TO == 64 case in small_memset. fn small_memset: Remove the unused UP_TO == 64 case Jul 14, 2024
Copy link
Collaborator

@kkysen kkysen left a comment

Choose a reason for hiding this comment

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

Oh yeah, I see there's no 64 case in C. That's good to remove then.

Copy link
Collaborator

@kkysen kkysen left a comment

Choose a reason for hiding this comment

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

Oh, I think I added 64 since I thought it'd always be optimized out by the UP_TO, which is at max 32 in our uses. That's optimized out, right? We can still get of it, though.

@nnethercote
Copy link
Contributor Author

Yeah, it's not perf-related, just a code clarity / symmetry with the C code thing.

@kkysen kkysen merged commit 6f9b213 into memorysafety:main Jul 14, 2024
27 checks passed
@nnethercote nnethercote deleted the rm-UP_TO-64 branch July 14, 2024 20:25
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