ion-python
ion-python copied to clipboard
Adds orjson into Ion python benchmark cli
Currently, orjson is removed from ion-python-benchmark-cli due to pypy incompatible. Need to add it back later.
Is orjson
notably better that other json implementations in some way? I don't think we need to support every possible json implementation, so unless this one is notable somehow, I suggest we just leave it out.
We considered incorporating orjson into the benchmark-cli back then is because (1) It's the fastest library for most of the use case and (2) it's a Rust-Python binding library while other libraries are using C/C++.
However, the reasons we are not using it as the primary baseline are:
- orjson is relatively new, which as a result, has fewer users (but it doesn't mean that it's not good)
- orjson generates
bytes
, while other JSON libraries generatestr
. This indicates that orjson is not a drop-in replacement for most applications as they typically usestr
. - orjson uses Rust-binding, which provides a significant performance boost. However, it requires further investigation whether the performance improvement is due to the library’s algorithm or the programming language Rust.
Agreed that we can just leave it unless there are specific comparisons needed such as Rust-binding implementation vs. CPython implementation.