[Python-ideas] Ordered storage of keyword arguments

M.-A. Lemburg mal at egenix.com
Thu Oct 28 13:52:35 CEST 2010

Antoine Pitrou wrote:
> On Thu, 28 Oct 2010 11:19:36 +0200
> spir <denis.spir at gmail.com> wrote:
>> On Thu, 28 Oct 2010 10:13:09 +0200
>> "M.-A. Lemburg" <mal at egenix.com> wrote:
>>> Ordered dicts are a lot slower than normal dictionaries. I don't
>>> think that we can make such a change unless we want to make
>>> Python a lot slower at the same time.
>> Ruby has ordered hashes since 1.9 with apparently no relevant
>> performance loss
> Performance would probably not suffer on micro-benchmarks (with
> everything fitting in the CPU's L1 cache), but making dicts bigger
> (by 66%: 5 pointer-sized fields per hash entry instead of 3) could
> be detrimental in real life workloads.

For function calls, yes. For class creation, I doubt that a few
extra bytes would make much difference in real life - classes typically
don't have thousands of methods or attributes :-)

Marc-Andre Lemburg

Professional Python Services directly from the Source  (#1, Oct 28 2010)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/

::: Try our new mxODBC.Connect Python Database Interface for free ! ::::

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611

More information about the Python-ideas mailing list