Skip to content

Improve float parsing performance#94

Merged
lelit merged 1 commit into
python-rapidjson:masterfrom
jonashaag:master
Jan 14, 2018
Merged

Improve float parsing performance#94
lelit merged 1 commit into
python-rapidjson:masterfrom
jonashaag:master

Conversation

@jonashaag

Copy link
Copy Markdown
Contributor

Don't bother converting floats to Python strings just to have CPython parse them to floats right after.

This improves float parsing performance around 20-30%.

The patch is probably not perfect. I haven't run the test suite, haven't read any contribution guides, etc. I just figured someone might be interested in this patch as it works well for me.

Don't bother converting floats to Python strings just to have CPython
parse them to floats right after.
@lelit lelit merged commit b59cba8 into python-rapidjson:master Jan 14, 2018
@lelit

lelit commented Jan 14, 2018

Copy link
Copy Markdown
Contributor

Thank you Jonas!

I intergrated your contribution with a few minor changes. I can confirm the parse speed improvement, but didn't update the benchmark tables yet.

@jonashaag

Copy link
Copy Markdown
Contributor Author

👍❤️

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.

2 participants