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