ceph-csi/vendor/github.com/mailru/easyjson/benchmark/ujson.sh

8 lines
335 B
Bash
Raw Normal View History

2018-01-09 18:57:14 +00:00
#/bin/bash
echo -n "Python ujson module, DECODE: "
python -m timeit -s "import ujson; data = open('`dirname $0`/example.json', 'r').read()" 'ujson.loads(data)'
echo -n "Python ujson module, ENCODE: "
python -m timeit -s "import ujson; data = open('`dirname $0`/example.json', 'r').read(); obj = ujson.loads(data)" 'ujson.dumps(obj)'