summaryrefslogtreecommitdiff
path: root/benchmarks/generate_json.py
diff options
context:
space:
mode:
Diffstat (limited to 'benchmarks/generate_json.py')
-rw-r--r--benchmarks/generate_json.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/benchmarks/generate_json.py b/benchmarks/generate_json.py
index d0c3de0..ec5a1aa 100644
--- a/benchmarks/generate_json.py
+++ b/benchmarks/generate_json.py
@@ -24,6 +24,23 @@ To run the write benchmark::
-s 'd = simplejson.loads(s)' \
'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 operator