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 benspiller
Recipients benspiller, serhiy.storchaka, vstinner
Date 2019-09-25.14:52:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1569423150.22.0.875491847704.issue38278@roundup.psfhosted.org>
In-reply-to
Content
Thanks... yep I realise method calls are slower than operators, am hoping we can still find a cunning way to speed up this use case nonetheless. :D For example by having a configuration option on dict (or making a new subclass) that gives the (speedy!) [] operator the same no-exception semantics you'd get from calling get(). As you can see from my timeit benchmarks none of the current workarounds are very appealing for this use case, and a 2.2x slowdown for this common operation is a shame.
History
Date User Action Args
2019-09-25 14:52:30benspillersetrecipients: + benspiller, vstinner, serhiy.storchaka
2019-09-25 14:52:30benspillersetmessageid: <1569423150.22.0.875491847704.issue38278@roundup.psfhosted.org>
2019-09-25 14:52:30benspillerlinkissue38278 messages
2019-09-25 14:52:30benspillercreate