1ec85e90cd
There is a performance impact when using dict() instead of {} in CPython (up to 6 times longer). Considering the to_primitive function is recursive this can have quite an effect. Measuring: $ python2.7 -m timeit -n 1000000 -r 5 -v 'dict()' raw times: 0.24 0.24 0.24 0.239 0.24 1000000 loops, best of 5: 0.239 usec per loop $ python2.7 -m timeit -n 1000000 -r 5 -v '{}' raw times: 0.0417 0.0413 0.0407 0.0411 0.042 1000000 loops, best of 5: 0.0407 usec per loop For more information: https://doughellmann.com/blog/2012/11/12/ the-performance-impact-of-using-dict-instead-of-in-cpython-2-7-2/ Change-Id: Ia0b5892773a19cbabe40313a3bc788580a943f53 |
||
---|---|---|
.. | ||
serializer | ||
tests | ||
__init__.py | ||
base64.py | ||
jsonutils.py | ||
msgpackutils.py |