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

Replaced vendored omnijson by the standard lib version #279

Merged
merged 1 commit into from Feb 24, 2017

Conversation

claudep
Copy link
Contributor

@claudep claudep commented Feb 21, 2017

Refs #273.

setup.py Outdated
print('Pip required.')
sys.exit(1)

os.system('pip install ujson')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it removed a feature (speed). We can try to import ujson if it is available.

try:
    import ujson as json
except ImportError:
    import json

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When reading the numbers on https://pypi.python.org/pypi/ujson, it seems own Python json is as fast or even faster, or did I misread them?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ujson is faster. The numbers in their benchmarks are number of operations. Higher is better.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just found http://jyotiska.github.io/blog/posts/json_vs_simplejson_vs_ujson.html
Then let's keep the ujson import, I'll update the patch.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you also want to keep the "speedups" part in setup.py?

@iurisilvio
Copy link
Collaborator

iurisilvio commented Feb 24, 2017 via email

@claudep
Copy link
Contributor Author

claudep commented Feb 24, 2017

Should be good to go now.

@iurisilvio iurisilvio merged commit 46102d4 into jazzband:master Feb 24, 2017
@iurisilvio
Copy link
Collaborator

Great! Thanks!

@claudep claudep deleted the simplejson branch December 30, 2019 15:35
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

Successfully merging this pull request may close these issues.

None yet

2 participants