Replies: 2 comments 1 reply
-
I did a quick test.
The results are indistinguishable
However, msgspec allows one to specify an enc_hook. That means we can now use custom encoders:
This gives 803 μs ± 10.6 μs per loop (mean ± std. dev. of 7 runs, 1,000 loops each). Somewhat slower (not sure why) but acceptable. Native json is strange.
always gives speed around the same as the one using encode hooks. |
Beta Was this translation helpful? Give feedback.
-
@DanielYang59 I actually found that you can use orjson with MontyEncoder.
actually works. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
https://jcristharif.com/msgspec/
Seems like a good package that can replace most of monty's current serialization with speed?
@DanielYang59 @mkhorton
Beta Was this translation helpful? Give feedback.
All reactions