Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Adds orjson into Ion python benchmark cli #253

Open
cheqianh opened this issue Mar 28, 2023 · 2 comments
Open

Adds orjson into Ion python benchmark cli #253

cheqianh opened this issue Mar 28, 2023 · 2 comments

Comments

@cheqianh
Copy link
Contributor

Currently, orjson is removed from ion-python-benchmark-cli due to pypy incompatible. Need to add it back later.

@popematt
Copy link
Contributor

popematt commented Jul 28, 2023

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.

@cheqianh
Copy link
Contributor Author

cheqianh commented Jul 28, 2023

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:

  1. orjson is relatively new, which as a result, has fewer users (but it doesn't mean that it's not good)
  2. orjson generates bytes, while other JSON libraries generate str. This indicates that orjson is not a drop-in replacement for most applications as they typically use str.
  3. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants