Commits

Bryan O'Sullivan  committed 464092c

Add a Python json benchmark.

Alas, it's about 3x faster than us, due to being written in C.

  • Participants
  • Parent commits 5262b2b

Comments (0)

Files changed (1)

File benchmarks/parse.py

+#!/usr/bin/env python
+
+import json, sys, time
+
+count = int(sys.argv[1])
+
+for n in sys.argv[2:]:
+    print '%s:' % n
+    start = time.time()
+    fp = open(n)
+    for i in xrange(count):
+        fp.seek(0)
+        val = json.load(fp)
+    end = time.time()
+    print ' ', end - start