Ben Spiller <spiller....@gmail.com> added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38278>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to