[Python-ideas] Question about `list.insert`
Antoine Pitrou
solipsis at pitrou.net
Fri Feb 7 15:59:46 CET 2014
On Fri, 7 Feb 2014 22:45:33 +1100
Chris Angelico <rosuav at gmail.com> wrote:
> But apart from
> maybe reducing the memory copying (the same optimization could mean
> that repeated pop(0) calls would incur less copying, too), there's not
> a huge gain.
If you think switching from O(n**2) to O(n) isn't a huge gain, then
indeed :-)
Regards
Antoine.
More information about the Python-ideas
mailing list