Skip to content

Instantly share code, notes, and snippets.

@teepark
Created December 7, 2009 04:03
Show Gist options
  • Save teepark/250602 to your computer and use it in GitHub Desktop.
Save teepark/250602 to your computer and use it in GitHub Desktop.
somehow the 3.1 branch is seeing an improvement in decoding (can't explain that), and a slowdown in encoding
python 2.6:
yajl serialize: 0.359 deserialize: 0.442 total: 0.801
yajl serialize: 0.359 deserialize: 0.433 total: 0.792
yajl serialize: 0.366 deserialize: 0.434 total: 0.800
yajl serialize: 0.363 deserialize: 0.426 total: 0.788
yajl serialize: 0.357 deserialize: 0.437 total: 0.794
yajl serialize: 0.364 deserialize: 0.423 total: 0.787
yajl serialize: 0.356 deserialize: 0.420 total: 0.776
yajl serialize: 0.362 deserialize: 0.441 total: 0.803
yajl serialize: 0.366 deserialize: 0.425 total: 0.791
yajl serialize: 0.362 deserialize: 0.435 total: 0.797
python 3.1:
yajl serialize: 0.434 deserialize: 0.366 total: 0.800
yajl serialize: 0.437 deserialize: 0.361 total: 0.799
yajl serialize: 0.446 deserialize: 0.374 total: 0.821
yajl serialize: 0.444 deserialize: 0.367 total: 0.811
yajl serialize: 0.459 deserialize: 0.368 total: 0.828
yajl serialize: 0.439 deserialize: 0.373 total: 0.812
yajl serialize: 0.442 deserialize: 0.363 total: 0.805
yajl serialize: 0.457 deserialize: 0.364 total: 0.821
yajl serialize: 0.439 deserialize: 0.366 total: 0.805
yajl serialize: 0.455 deserialize: 0.371 total: 0.827
this result for python 3.1 after changing decoding to output bytes instead of unicode strings:
yajl serialize: 0.424 deserialize: 0.361 total: 0.785
yajl serialize: 0.431 deserialize: 0.374 total: 0.805
yajl serialize: 0.425 deserialize: 0.371 total: 0.796
yajl serialize: 0.429 deserialize: 0.379 total: 0.808
yajl serialize: 0.421 deserialize: 0.376 total: 0.797
yajl serialize: 0.443 deserialize: 0.380 total: 0.823
yajl serialize: 0.420 deserialize: 0.374 total: 0.794
yajl serialize: 0.427 deserialize: 0.378 total: 0.805
yajl serialize: 0.422 deserialize: 0.381 total: 0.804
yajl serialize: 0.429 deserialize: 0.386 total: 0.815
serialization improved by ~30ms, but still ~60ms slower than python 2.x.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment