Open naktinis opened 3 years ago
Thanks for the report, I can more or less reproduce the results. (Please include all of the code next time though, it makes it much easier.)
This crate hasn't been optimized for speed (yet), so it's not surprising that it won't outperform Python's pickle module. As for a comparison between different formats, that is always a little more difficult to reason about.
In any case I can't spend much time on this at present - PRs are welcome and I expect there might be some easy wins achievable with basic profiling.
I set up a simple benchmark with a 67MB pickle and measured deserialization speed in 7 scenarios.
pickle.load
json.load
from_str
from_slice
marshal_load
from_reader
from_slice
Is this a known behavior? Is there any hope of this getting improved in the foreseeable future? I share my setup below, so you can point out any issues or things I missed.
Data
Python load
Rust load
Dependencies