Skip to content

perf: use new PyLong* API for num-bigint feature#6144

Open
chirizxc wants to merge 28 commits into
PyO3:mainfrom
chirizxc:PyLongForBigInt
Open

perf: use new PyLong* API for num-bigint feature#6144
chirizxc wants to merge 28 commits into
PyO3:mainfrom
chirizxc:PyLongForBigInt

Merge branch 'main' into PyLongForBigInt

b1899b6
Select commit
Loading
Failed to load commit list.
CodSpeed HQ / CodSpeed Performance Analysis succeeded Jun 30, 2026 in 0s

Performance Gate Passed

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 23 improved benchmarks
✅ 117 untouched benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
into_bigint_huge_negative 23.6 µs 6.6 µs ×3.6
extract_biguint_negative_fail 7.2 µs 2.3 µs ×3.2
extract_biguint_zero 2,758.9 ns 946.1 ns ×2.9
into_bigint_huge_positive 17.4 µs 6.7 µs ×2.6
into_biguint_huge 17.1 µs 6.7 µs ×2.6
into_bigint_big_negative 5.3 µs 2.1 µs ×2.5
into_bigint_small 3.2 µs 1.5 µs ×2.1
into_bigint_big_positive 4.5 µs 2.1 µs ×2.1
into_biguint_big 4.3 µs 2.2 µs +96.34%
into_biguint_small 3.3 µs 2 µs +68.45%
extract_bigint_small 2.7 µs 1.8 µs +53.52%
extract_bigint_huge_negative 13 µs 8.5 µs +52.37%
extract_biguint_small 2.6 µs 1.7 µs +50.52%
into_biguint_zero 2.9 µs 2 µs +41.44%
extract_biguint_huge 11.8 µs 8.5 µs +37.87%
extract_bigint_huge_positive 11.7 µs 8.5 µs +37.36%
extract_bigint_big_negative 3.9 µs 3.4 µs +14.46%
extract_i128_small_pos 1.2 µs 1.1 µs +14.18%
extract_i128_zero 1.3 µs 1.1 µs +13.81%
extract_i128_small_neg 1.3 µs 1.2 µs +13.06%
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

Tip

Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.


Comparing chirizxc:PyLongForBigInt (b1899b6) with main (126aa44)

Open in CodSpeed