ujson.sh 335 B

1234567
  1. #/bin/bash
  2. echo -n "Python ujson module, DECODE: "
  3. python -m timeit -s "import ujson; data = open('`dirname $0`/example.json', 'r').read()" 'ujson.loads(data)'
  4. echo -n "Python ujson module, ENCODE: "
  5. python -m timeit -s "import ujson; data = open('`dirname $0`/example.json', 'r').read(); obj = ujson.loads(data)" 'ujson.dumps(obj)'