profiling and optimizing
rosuav at gmail.com
Tue Jul 31 14:21:08 CEST 2012
On Tue, Jul 31, 2012 at 10:13 PM, Rita <rmorgan466 at gmail.com> wrote:
> It seems majority of the time is taking in the deep copy but that seems to
> come from a function (or functions) in the code. Is there a way to optimize
Why is the program deep-copying things? Rather than making deepcopy
faster, consider doing it less.
Normally I would first ask: Does the program even NEED optimization?
Often the answer is no, because it's already fast enough - for
instance, if it spends all its time waiting for the internet, there's
little point reducing its CPU footprint. However, that point is moot
in this instance, since you're doing the profiling/optimization for
education rather than performance :) Have fun with it!
More information about the Python-list