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

Use ujson as a drop in replacement for json library? #95

Open
goanpeca opened this issue Jul 3, 2020 · 5 comments
Open

Use ujson as a drop in replacement for json library? #95

goanpeca opened this issue Jul 3, 2020 · 5 comments

Comments

@goanpeca
Copy link
Member

goanpeca commented Jul 3, 2020

A library called ujson is a drop-in replacement for the json. I will be using that on the localization plugin and thought could be useful here, although for smaller files the gain is probably small also.

@goanpeca goanpeca changed the title USe ujson as a drop in replacement for json library? Use ujson as a drop in replacement for json library? Jul 3, 2020
@bollwyvl
Copy link
Contributor

bollwyvl commented Jul 3, 2020

The speed gains from ujson are good... but orjson, pysimdjson... the list goes on of other libraries that offer a different set of features/performance against increasing complexity... for example, ujson just got working binary wheels again for all supported platforms.

If anything, I'd imagine trying to find a library that wrapped (but did not depend on) all of these...

@blink1073
Copy link
Member

I'd support any of the above provided they're installable as wheels and available on conda-forge.

@jasongrout
Copy link
Contributor

at least orjson says it may not work on 32-bit, which means jupyter presumably wouldn't work on my Raspberry pi anymore :(.

What about pypy support as well?

I think we could perhaps try to use something like ujson or orjson if we can import it, but fall back to the standard library json if it is not available.

@goanpeca
Copy link
Member Author

I think we could perhaps try to use something like ujson or orjson if we can import it, but fall back to the standard library json

Sure, that makes sense too.

@TkTech
Copy link

TkTech commented Aug 31, 2020

Can I ask what leaned you towards picking ujson or orjson over pysimdjson? It helps me improve the library and packaging.

Note pysimdjson has pretty wide compatibility, and is tested against linux/macosx/windows/freebsd (x86_64 and ARM) for py3.5 -> 3.9beta, as well as pypy3. It has binary ARM packages as well, so it will install quickly on your raspberry pi (3 or 4) as long as you're using one of the 64 bit OSes.

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

No branches or pull requests

5 participants