Skip to content

chore: use std::hint::black_box #97

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

DaniPopes
Copy link

It has been stable for quite a while now.

@DaniPopes DaniPopes force-pushed the std-black-box branch 2 times, most recently from c2993d9 to 3a761fe Compare May 26, 2025 17:00
It has been stable for quite a while now.
@DaniPopes DaniPopes changed the title Use std::hint::black_box chore: use std::hint::black_box May 26, 2025
Copy link

codspeed-hq bot commented Jun 16, 2025

CodSpeed Instrumentation Performance Report

Merging #97 will degrade performances by 18.86%

Comparing DaniPopes:std-black-box (1763484) with main (5caa771)

Summary

❌ 4 regressions
✅ 159 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
a 254.7 ns 281.4 ns -9.48%
a 254.7 ns 281.4 ns -9.48%
fibo_iterative 126.7 ns 156.1 ns -18.86%
fibonacci_custom_measurement 916.7 ns 945.8 ns -3.08%

Copy link

codspeed-hq bot commented Jun 16, 2025

CodSpeed Walltime Performance Report

Merging #97 will degrade performances by 87.34%

Comparing DaniPopes:std-black-box (1763484) with main (5caa771)

Summary

⚡ 10 improvements
❌ 6 regressions
✅ 129 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
build_vec 212 ns 202 ns +4.95%
large_drop 169.7 µs 179.2 µs -5.31%
large_setup 13 ns 12 ns +8.33%
from_elem[2048] 256 ns 236 ns +8.47%
from_elem[4096] 332 ns 319 ns +4.08%
from_elem_decimal[1024] 79 ns 82 ns -3.66%
graph_coloring[3] 2.4 µs 1 µs ×2.3
graph_coloring[6] 4.7 µs 4.4 µs +7.93%
rat_in_maze[6] 5.8 µs 3 µs +95.23%
generate_gray_code[1] 1 µs 2.1 µs -50%
generate_gray_code[2] 920 ns 3,730 ns -75.34%
generate_gray_code[3] 455 ns 3,593 ns -87.34%
generate_gray_code[4] 911 ns 3,572 ns -74.5%
instant 5.1 µs 4.9 µs +3.4%
sleep_100ns 55.1 µs 15.7 µs ×3.5
sleep_1us 58.6 µs 26.8 µs ×2.2

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.

1 participant