akrylysov / python-json-benchmark Goto Github PK
View Code? Open in Web Editor NEWBenchmark of Python JSON libraries
Benchmark of Python JSON libraries
I run the benchmark at my machine of ubuntu18 with python3.6.7 and installed the latest packages:
# pip freeze
python-rapidjson==0.7.0
simplejson==3.16.0
ujson==1.35
Got result as follows:
3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0]
Running json benchmarks...
Running simplejson benchmarks...
Running ujson benchmarks...
Running rapidjson benchmarks...
Unable to import cjson
Results
=======
loads (large obj)
-----------------
json 0.745s
simplejson 0.784s
ujson 0.803s
rapidjson 0.895s
dumps (large obj)
-----------------
json 0.788s
simplejson 0.707s
ujson 0.429s
rapidjson 0.468s
loads (small objs)
------------------
json 0.870s
simplejson 1.118s
ujson 0.326s
rapidjson 0.576s
dumps (small objs)
------------------
json 1.300s
simplejson 2.118s
ujson 0.336s
rapidjson 0.485s
I think it is better to show it like this:
Results
=======
loads (large obj)
-----------------
package | cost time(seconds)
json 0.745
simplejson 0.784
ujson 0.803
rapidjson 0.895
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.