On 31 July 2012 13:13, Rita <rmorgan...@gmail.com> wrote: > hello, > > 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? >
I think you'll need to provide more information to get an answer to your question. Why are you copying? What are you copying? Do you need a deep-copy? I don't really know what you're doing but my first approach would be to try and reduce or eliminate the deep copies rather than implement them in c. Oscar. > > > > > > > -- > --- Get your facts first, then you can distort them as you please.-- > > -- > http://mail.python.org/mailman/listinfo/python-list > >
-- http://mail.python.org/mailman/listinfo/python-list