Re: profiling and optimizing

Discussion in 'Python' started by Chris Angelico, Jul 31, 2012.

  1. On Tue, Jul 31, 2012 at 10:13 PM, Rita <> 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
    > that?


    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!

    Chris Angelico
     
    Chris Angelico, Jul 31, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dimitri Ognibene
    Replies:
    0
    Views:
    379
    Dimitri Ognibene
    Apr 25, 2006
  2. Kapil Khosla
    Replies:
    2
    Views:
    310
    Peter van Merkerk
    Jul 18, 2003
  3. Replies:
    1
    Views:
    96
    Mike Austin
    Mar 12, 2006
  4. Stefan Behnel

    Re: profiling and optimizing

    Stefan Behnel, Jul 31, 2012, in forum: Python
    Replies:
    0
    Views:
    144
    Stefan Behnel
    Jul 31, 2012
  5. Peter Otten

    Re: profiling and optimizing

    Peter Otten, Jul 31, 2012, in forum: Python
    Replies:
    0
    Views:
    173
    Peter Otten
    Jul 31, 2012
Loading...

Share This Page