pydantic / jiter

Fast iterable JSON parser.
https://crates.io/crates/jiter
MIT License
251 stars 18 forks source link

speedup string parsing by copying serde a little #58

Closed samuelcolvin closed 9 months ago

codspeed-hq[bot] commented 9 months ago

CodSpeed Performance Report

Merging #58 will improve performances by 49.96%

Comparing string-parsing-speedup (e5112ef) with main (0b21d4a)

Summary

⚡ 2 improvements ✅ 43 untouched benchmarks

🆕 6 new benchmarks

Benchmarks breakdown

Benchmark main string-parsing-speedup Change
x100_jiter_value 6.8 µs 5.5 µs +23.94%
🆕 sentence_serde_value N/A 24.4 µs N/A
🆕 sentence_jiter_iter N/A 18.3 µs N/A
x100_jiter_iter 4 µs 2.7 µs +49.96%
🆕 python_parse_x100_not_cached N/A 9.7 µs N/A
🆕 python_parse_x100 N/A 10 µs N/A
🆕 x100_serde_iter N/A 5.9 µs N/A
🆕 sentence_jiter_value N/A 20.4 µs N/A
codecov[bot] commented 9 months ago

Codecov Report

Merging #58 (e5112ef) into main (0b21d4a) will increase coverage by 0.22%. The diff coverage is 98.38%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #58 +/- ## ========================================== + Coverage 95.12% 95.35% +0.22% ========================================== Files 8 8 Lines 1067 1097 +30 ========================================== + Hits 1015 1046 +31 + Misses 52 51 -1 ``` | [Files](https://app.codecov.io/gh/pydantic/jiter/pull/58?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pydantic) | Coverage Δ | | |---|---|---| | [src/string\_decoder.rs](https://app.codecov.io/gh/pydantic/jiter/pull/58?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pydantic#diff-c3JjL3N0cmluZ19kZWNvZGVyLnJz) | `94.63% <98.38%> (+2.19%)` | :arrow_up: | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/pydantic/jiter/pull/58?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pydantic). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pydantic) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/pydantic/jiter/pull/58?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pydantic). Last update [0b21d4a...e5112ef](https://app.codecov.io/gh/pydantic/jiter/pull/58?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pydantic). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pydantic).