-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
better implementation of signed div_floor/ceil #130002
Conversation
rustbot has assigned @Mark-Simulacrum. Use |
r? @thomcc |
Very nice. I doubt the compiler uses this at all but lets avoid rollup just to be safe. @bors r+ rollup=never |
☀️ Test successful - checks-actions |
Finished benchmarking commit (adf8d16): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)Results (secondary -2.3%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 754.738s -> 756.685s (0.26%) |
Tracking issue for signed
div_floor
/div_ceil
: #88581.This PR improves the implementation of those two functions by adding a better branchless algorithm. Side-by-side comparison of
i32::div_floor
on x86-64:And on Aarch64: