Skip to content

ci: drop redundant black_box in extract_int_cast_fail - #6650

Merged
Tpt merged 1 commit into
PyO3:mainfrom
ddxwzc-boop:bench-extract-int-cast-fail
Dec 2, 2026
Merged

Tpt merged 1 commit into
PyO3:mainfrom
ddxwzc-boop:bench-extract-int-cast-fail

Conversation

@ddxwzc-boop

@ddxwzc-boop ddxwzc-boop commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Bencher::iter already black-boxes the return value, so the extra black_box(e) is redundant.

Bencher::iter already black-boxes the return value, so the extra
black_box(e) is redundant. It also forces the 16-byte CastError to be
stored as two 8-byte writes and reloaded 16 bytes wide, which can't be
store-forwarded, so the benchmark mostly measures that stall: 11.1 ->
1.2 ns on EPYC 9654, 5.1 -> 2.8 ns on Kunpeng 950. With `e` the result
matches extract_str_cast_fail on the same machine.

Fixes PyO3#6649.
@Tpt
Tpt added this pull request to the merge queue Dec 2, 2026
Merged via the queue into PyO3:main with commit aeff15b Dec 2, 2026
57 of 58 checks passed
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