Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Performance of deserializing IgnoredAny #174

Closed
dtolnay opened this issue Dec 21, 2016 · 2 comments
Closed

Performance of deserializing IgnoredAny #174

dtolnay opened this issue Dec 21, 2016 · 2 comments

Comments

@dtolnay
Copy link
Member

dtolnay commented Dec 21, 2016

I haven't benchmarked but there may be an opportunity to optimize IgnoredAny. Currently the codepath for deserialize_ignored_any is the same as for deserializing a serde_json::Value. It jumps back and forth into the IgnoredAny's Visitor and does all of the work that entails, including buffering up long strings, converting floating point values to f64, etc.

Instead we should be able to very quickly scan and do only the most basic syntactic checks, not buffering strings or interpreting numbers.

This could be a good intro task for somebody interested in performance. I can provide mentorship.

@dtolnay
Copy link
Member Author

dtolnay commented Sep 4, 2017

The Pikkr benchmark will be a good way to measure this https://github.com/pikkr/pikkr. They ignore most of the data.

@dtolnay
Copy link
Member Author

dtolnay commented Sep 4, 2017

I implemented this in #356. It looks like a nice 45% performance improvement on that benchmark.

# for free to join this conversation on GitHub. Already have an account? # to comment
Development

No branches or pull requests

1 participant