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

add PyFloat::new_bound #3773

Merged
merged 1 commit into from
Jan 29, 2024
Merged

add PyFloat::new_bound #3773

merged 1 commit into from
Jan 29, 2024

Conversation

davidhewitt
Copy link
Member

Part of #3684.

This implements PyFloat::new_bound, adds the deprecation warning to PyFloat::new, and migrates PyO3 code over to the new API.

@davidhewitt davidhewitt added the CI-skip-changelog Skip checking changelog entry label Jan 29, 2024
Copy link

codspeed-hq bot commented Jan 29, 2024

CodSpeed Performance Report

Merging #3773 will degrade performances by 53.12%

Comparing davidhewitt:float-new-bound (345e122) with main (c54d897)

Summary

⚡ 3 improvements
❌ 4 regressions
✅ 73 untouched benchmarks

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

Benchmarks breakdown

Benchmark main davidhewitt:float-new-bound Change
extract_float_extract_success 408.9 ns 464.4 ns -11.96%
extract_float_downcast_success 418.9 ns 474.4 ns -11.71%
extract_int_downcast_fail 266.1 ns 238.3 ns +11.66%
test_simple_py 34.7 µs 31.4 µs +10.48%
f64_from_pyobject 359.4 ns 766.7 ns -53.12%
not_a_list_via_downcast 211.7 ns 183.9 ns +15.11%
list_via_downcast 157.2 ns 185 ns -15.02%

@davidhewitt
Copy link
Member Author

Thanks for the quick approval!

For what it's worth, the float benchmark regressions are not a surprise, ideally these will reverse once I update FromPyObject for f64 for #3706.

@davidhewitt davidhewitt added this pull request to the merge queue Jan 29, 2024
Merged via the queue into PyO3:main with commit 7549a21 Jan 29, 2024
37 of 38 checks passed
@davidhewitt davidhewitt deleted the float-new-bound branch January 29, 2024 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI-skip-changelog Skip checking changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants