Message298357
> On other hand, this optimization already is implemented for integers, strings, bytes and slices.
Probably for good reasons, though, that don't necessarily apply to general containers / other objects.
I can see the possible value for strings and bytes, where filtering on a particular value might involve a good number of `s == s` comparisons (especially given string interning). Similarly, I could believe that small integer caching means that `0 == 0` or `1 == 1` comparisons happen often enough to make the 'is' optimisation worth it. I'm a bit bemused by the slice case, though. |
|
Date |
User |
Action |
Args |
2017-07-14 15:20:59 | mark.dickinson | set | recipients:
+ mark.dickinson, tim.peters, rhettinger, vstinner, serhiy.storchaka, wbolster |
2017-07-14 15:20:59 | mark.dickinson | set | messageid: <1500045659.02.0.813359318141.issue30907@psf.upfronthosting.co.za> |
2017-07-14 15:20:59 | mark.dickinson | link | issue30907 messages |
2017-07-14 15:20:58 | mark.dickinson | create | |
|