Raymond Hettinger added the comment:

Attaching a variant with several fix-ups (mostly minor):

* Changed the order of the three sections to go from 
most-restricted-most-optimized to the general-fall-through case.  The downside 
is that we test so->fill==0 twice.  The upside is that it corresponds to my way 
of thinking about the logic.

* Put the fill/used increments in the same order as the rest of the file.

* Loop over other_entry++ instead of using indexing.  This corresponds to my 
way of thinking about the entries and gives the compiler a stronger hint that 
it can avoid the indexing overhead.

* Removed the unnecessary dummy check from the direct_pointer_copy case.

* Switch the order of the same size and no dummies tests in the insert_clean 
case.

* Revise the comments to be clearer about the requirements for each case.

* Move the sometimes unnecessary hash variable assignments inside the 
conditional.

----------
Added file: http://bugs.python.org/file39352/set_faster_copy_6.diff

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

Reply via email to