Commits

Bryan O'Sullivan committed 16c27f1

Add a Python encoder

  • Participants
  • Parent commits ad7f123

Comments (0)

Files changed (1)

File benchmarks/encode.py

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