Message353210
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. |
|
Date |
User |
Action |
Args |
2019-09-25 14:52:30 | benspiller | set | recipients:
+ benspiller, vstinner, serhiy.storchaka |
2019-09-25 14:52:30 | benspiller | set | messageid: <1569423150.22.0.875491847704.issue38278@roundup.psfhosted.org> |
2019-09-25 14:52:30 | benspiller | link | issue38278 messages |
2019-09-25 14:52:30 | benspiller | create | |
|