Skip to content
Snippets Groups Projects
Commit 4a6a3d69690f authored by Bob Ippolito's avatar Bob Ippolito
Browse files

document speedup toggle in benchmarks

parent 8054e80baa08
No related merge requests found
...@@ -24,6 +24,23 @@ ...@@ -24,6 +24,23 @@
-s 'd = simplejson.loads(s)' \ -s 'd = simplejson.loads(s)' \
'simplejson.dumps(d)' 'simplejson.dumps(d)'
To run the read benchmark with speedups disabled::
$ python -m timeit -n 1 -r 5 \
-s 'import simplejson' \
-s 'simplejson._use_speedups(False)' \
-s 's = open("build/bench/feed.json", "rb").read()' \
'simplejson.loads(s)'
To run the write benchmark with speedups disabled::
$ python -m timeit -n 1 -r 5 \
-s 'import simplejson' \
-s 'simplejson._use_speedups(False)' \
-s 's = open("build/bench/feed.json", "rb").read()' \
-s 'd = simplejson.loads(s)' \
'simplejson.dumps(d)'
""" """
import sys import sys
import operator import operator
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment