Well, it was just a remark.

2016-01-12 0:35 GMT+01:00 Andrew Barnert <abarn...@yahoo.com>:
> Are you saying that d[key] = d[key] may or may not increment the version, so 
> any optimizer can't rely on the fact that it doesn't?

Optimizers don't have to rely on this exactly behaviour. Not
incrementing the version on such case avoids dictionary lookups in the
guard.

My current patch does not increment if the value is the same, and I'm
unable to see any performance regression on *micro* benchmarks:
https://bugs.python.org/issue26058

So I'm in favor of making guards as efficient as possible and not
increment the version in dict ;-)

Victor
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to