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

Parse big ints using PyLong_FromString instead of BigInt #61

Closed
wants to merge 2 commits into from

Conversation

samuelcolvin
Copy link
Member

Seems to be a little bit slower, I thought this might be faster as it's what ujson does.

@davidhewitt any thoughts? Most of the time seems to be in PyLong_FromString, flamegraph here.

Copy link

codecov bot commented Jan 20, 2024

Codecov Report

Merging #61 (e184aa3) into main (13070b9) will decrease coverage by 0.28%.
The diff coverage is 91.54%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #61      +/-   ##
==========================================
- Coverage   95.35%   95.07%   -0.28%     
==========================================
  Files           8        8              
  Lines        1097     1137      +40     
==========================================
+ Hits         1046     1081      +35     
- Misses         51       56       +5     
Files Coverage Δ
src/parse.rs 98.74% <100.00%> (ø)
src/python.rs 94.01% <100.00%> (+0.32%) ⬆️
src/number_decoder.rs 89.79% <90.00%> (-0.73%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 13070b9...e184aa3. Read the comment docs.

Copy link

codspeed-hq bot commented Jan 20, 2024

CodSpeed Performance Report

Merging #61 will improve performances by 16.86%

Comparing big-int-str (e184aa3) with main (13070b9)

Summary

⚡ 3 improvements
✅ 48 untouched benchmarks

🆕 1 new benchmarks

Benchmarks breakdown

Benchmark main big-int-str Change
massive_ints_array_jiter_value 5.3 ms 4.7 ms +12.66%
massive_ints_array_jiter_iter 4.3 ms 3.7 ms +16.86%
bigints_array_jiter_iter 834.8 µs 744.4 µs +12.14%
🆕 python_parse_massive_ints_array N/A 7.6 ms N/A

@samuelcolvin
Copy link
Member Author

closing as this wasn't faster for strings, we'll use #65 instead.

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.

None yet

1 participant