Go to file
Edan David 1ec85e90cd Use {} instead of dict()
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
2016-06-21 10:58:06 -04:00
2015-11-16 21:41:23 +08:00
2015-10-01 14:32:29 +00:00
2015-11-17 15:05:37 +08:00
2015-09-17 12:16:12 +00:00

oslo.serialization

Latest Version

Downloads

The oslo.serialization library provides support for representing objects in transmittable and storable formats, such as Base64, JSON and MessagePack.

Description
OpenStack library for serialization
Readme 3.4 MiB
Languages
Python 100%