"Dustan" <[EMAIL PROTECTED]> writes:
> I have a program that uses up a lot of CPU and want to make it is
> efficient as possible with what I have to work with it.
Profile your program and find the precise parts that are the
slowest. Attempting to optimise before that is a waste of your time.
> So which of the following would be more efficient, knowing that l is
> a list and size is a number?
>
> l=l[:size]
> del l[size:]
Which one is more efficient in your program, when you profile its
performance?
<URL:http://docs.python.org/lib/profile.html>
--
\ "Working out the social politics of who you can trust and why |
`\ is, quite literally, what a very large part of our brain has |
_o__) evolved to do." -- Douglas Adams |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list