This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.snow
Recipients alex, asvetlov, benjamin.peterson, eric.araujo, eric.snow, ezio.melotti, flox, rhettinger, serhiy.storchaka
Date 2013-06-04.06:08:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Without too many optimzations, the C implementation of OrderedDict is basically between 1x and 4x the performance of raw dict.  This contrasts with the pure Python OrderedDict, which falls in roughly between 4x and 100x.

I've attached an addition to pybench, not intended to be committed, that compares the 3.  Run any of these commands to get timing:

  ./python Tools/pybench/ -t ODict
  ./python Tools/pybench/ -t ODict -t _Py
  ./python Tools/pybench/ -t ODict -t _C
  ./python Tools/pybench/ -t ODict -t _Dict

I tuned the # rounds for each test such that the raw dict results all come out to just about the same value (2ms on my computer).  That way it's easy to compare the pure Python or C results to the dict results.
Date User Action Args
2013-06-04 06:08:50eric.snowsetrecipients: + eric.snow, rhettinger, benjamin.peterson, ezio.melotti, eric.araujo, alex, asvetlov, flox, serhiy.storchaka
2013-06-04 06:08:50eric.snowsetmessageid: <>
2013-06-04 06:08:50eric.snowlinkissue16991 messages
2013-06-04 06:08:49eric.snowcreate