nova/nova/pci
ChangBo Guo(gcb) 69fef14509 Performance: leverage dict comprehension in PEP-0274
PEP-0274 introduced dict comprehensions to replace dict constructor
with a sequence of length-2 sequences, these are benefits copied
from [1]:
  The dictionary constructor approach has two distinct disadvantages
  from the proposed syntax though.  First, it isn't as legible as a
  dict comprehension.  Second, it forces the programmer to create an
  in-core list object first, which could be expensive.
Nova dropped python 2.6 support, we can leverage this now.
There is deep dive about PEP-0274[2] and basic tests about
performance[3].
Note: This commit doesn't handle dict constructor with kwagrs.
This commit also adds a hacking rule.

[1]http://legacy.python.org/dev/peps/pep-0274/
[2]http://doughellmann.com/2012/11/12/the-performance-impact-of-using-dict-instead-of-in-cpython-2-7-2.html
[3]http://paste.openstack.org/show/154798/

Change-Id: Ifb5cb05b9cc2b8758d5a8e34f7792470a73d7c40
2015-01-16 10:06:13 +08:00
..
__init__.py PCI utils 2013-08-23 14:21:12 +08:00
device.py Clean up the naming of PCI python modules 2014-10-16 00:04:42 -04:00
devspec.py Support both list and dict for pci_passthrough_whitelist 2015-01-05 15:31:29 +00:00
manager.py Replacement `_` on `_LW` in all LOG.warning part 1 2014-11-20 11:19:16 +02:00
request.py Clean up the naming of PCI python modules 2014-10-16 00:04:42 -04:00
stats.py Performance: leverage dict comprehension in PEP-0274 2015-01-16 10:06:13 +08:00
utils.py Support macvtap for vif_type being hw_veb 2014-12-05 21:55:31 -05:00
whitelist.py Support both list and dict for pci_passthrough_whitelist 2015-01-05 15:31:29 +00:00