Last active
August 29, 2015 14:01
-
-
Save rouge8/6b68ab4c362c1fb3c744 to your computer and use it in GitHub Desktop.
pypy performance regression with fastavro https://bugs.pypy.org/issue1770
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -eu | |
VENV_DIR=/tmp/fastavro-venv | |
function cleanup() { | |
rm -rf "$VENV_DIR" | |
} | |
function benchmark() { | |
$VENV_DIR/bin/pip install -q fastavro | |
time $VENV_DIR/bin/fastavro uuids.avro > /dev/null | |
cleanup | |
} | |
cleanup | |
echo Python 2.7 | |
virtualenv -q $VENV_DIR | |
benchmark | |
for pypy in {1.8,1.9,2.0.2,2.1,2.2,2.3} | |
do | |
echo | |
echo PyPy $pypy | |
virtualenv -q -p ~/Downloads/pypy-$pypy/bin/pypy $VENV_DIR | |
benchmark | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Python 2.7 | |
real 0m1.137s | |
user 0m1.102s | |
sys 0m0.029s | |
PyPy 1.8 | |
real 0m1.286s | |
user 0m1.220s | |
sys 0m0.060s | |
PyPy 1.9 | |
real 0m8.409s | |
user 0m8.297s | |
sys 0m0.088s | |
PyPy 2.0.2 | |
real 0m7.865s | |
user 0m7.733s | |
sys 0m0.063s | |
PyPy 2.1 | |
real 0m7.725s | |
user 0m7.596s | |
sys 0m0.067s | |
PyPy 2.2 | |
real 0m8.041s | |
user 0m7.956s | |
sys 0m0.071s | |
PyPy 2.3 | |
real 0m8.253s | |
user 0m8.144s | |
sys 0m0.069s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type" : "record", | |
"name" : "twitter_schema", | |
"namespace" : "com.miguno.avro", | |
"fields" : [ { | |
"name" : "username", | |
"type" : "string", | |
"doc" : "Name of the user account on Twitter.com" | |
}, { | |
"name" : "tweet", | |
"type" : "string", | |
"doc" : "The content of the user's Twitter message" | |
}, { | |
"name" : "timestamp", | |
"type" : "long", | |
"doc" : "Unix epoch time in seconds" | |
} ], | |
"doc:" : "A basic schema for storing Twitter messages" | |
} |
View raw
(Sorry about that, but we can’t show files that are this big right now.)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment