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 <1370326130.12.0.714629989348.issue16991@psf.upfronthosting.co.za>
In-reply-to
Content
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/pybench.py -t ODict
  ./python Tools/pybench/pybench.py -t ODict -t _Py
  ./python Tools/pybench/pybench.py -t ODict -t _C
  ./python Tools/pybench/pybench.py -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.
History
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: <1370326130.12.0.714629989348.issue16991@psf.upfronthosting.co.za>
2013-06-04 06:08:50eric.snowlinkissue16991 messages
2013-06-04 06:08:49eric.snowcreate