Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #26305 > unrolled thread

Re: profiling and optimizing

Started byStefan Behnel <stefan_ml@behnel.de>
First post2012-07-31 14:22 +0200
Last post2012-07-31 14:22 +0200
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: profiling and optimizing Stefan Behnel <stefan_ml@behnel.de> - 2012-07-31 14:22 +0200

#26305 — Re: profiling and optimizing

FromStefan Behnel <stefan_ml@behnel.de>
Date2012-07-31 14:22 +0200
SubjectRe: profiling and optimizing
Message-ID<mailman.2771.1343737365.4697.python-list@python.org>
Rita, 31.07.2012 14:13:
> I recently inherented a large python process and everything is lovely. As a
> learning experience I would like to optimize the code so I ran it thru the
> profiler
> 
> python -m cProfile myscript.py
> 
> 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? perhaps have a C implementation of the deep copy? Would that
> be feasible?

Those approaches would be my second (or maybe even later) step. The first
one would be to check if the deep copy is really necessary, and if so, if
it is really necessary to do it over the full depth of the entire object graph.

Stefan

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web