Message 171312 - Python tracker (original) (raw)
I'm not sure of the usefulness of this comment. removing, then.
"else" redundant here.
Instead of using a local variable "intersected", you can simply add "else Py_INCREF(other)" here and then decref "other" unconditionally. It will be shorter and perhaps a little clearer, but a bit slower.
I find my first patch more readable and efficient, but if these comments are conformant to pep7.. Attaching updated patch (.3.patch)
Did you run benchmarks in debug mode? Yes, but bench.py is available, fell free to run it with whatever configuration; my example was done with a --with-pydebug and clang compiler.
In order for results to be convenient to compare please sort it by name. Done.