Skip to content

add PyFloat::new_bound#3773

Merged
davidhewitt merged 1 commit intoPyO3:mainfrom
davidhewitt:float-new-bound
Jan 29, 2024
Merged

add PyFloat::new_bound#3773
davidhewitt merged 1 commit intoPyO3:mainfrom
davidhewitt:float-new-bound

Conversation

@davidhewitt
Copy link
Copy Markdown
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
@codspeed-hq
Copy link
Copy Markdown

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
Copy Markdown
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
@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