pydantic / jiter

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

faster creation of `PyList` #74

Open samuelcolvin opened 5 months ago

codspeed-hq[bot] commented 5 months ago

CodSpeed Performance Report

Merging #74 will not alter performance

Comparing fast-pylist (6e80788) with main (f6b698e)

Summary

✅ 59 untouched benchmarks

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

:loudspeaker: Thoughts on this report? Let us know!

samuelcolvin commented 5 months ago

This makes a substantial difference locally, but codspeed seems to disagree

image

???

davidhewitt commented 5 months ago

Is "locally" arm or x86_64? Might differ greatly between the two platforms.

TBH I'm ok with this but I also just think that really PyO3 should be reworking its list constructor to allow this.

samuelcolvin commented 5 months ago

Locally was macos.

samuelcolvin commented 5 months ago

Not clear there's an improvement on x86, might even be worse (although I have no idea how it could be):

image

So I'll leave this, we can either reconsider or close.

davidhewitt commented 5 months ago

I think better is that I aim to fix PyO3 to avoid needless reference count operations. Would be a modest speedup for quite a few operations / smaller binary size :)