Execution speed question
bearophileHUGS at lycos.com
bearophileHUGS at lycos.com
Mon Jul 28 06:28:05 EDT 2008
Suresh Pillai:
> Or 4, since the order of my nodes doesn't matter: swap the node to be
> deleted with the last node in the list and then remove the last node of
> the list. This is the fastest to date, if using native structures, for
> low number nodes being deleted per cycle (def if only deleting one).
Using Psyco this suggestion may lead to code as fast as it gets in
Python :-)
Bye,
bearophile
More information about the Python-list
mailing list