Re: inheriting a large python code base

2014-02-21 Thread craig
Look at the algorithms and see if there are faster ways. Great advice with the comments of writing test cases, getting into version control, taking passes through the code with tools, understanding what is slow and why it is considered slow. Then you should invest the time to understand the in

Re: inheriting a large python code base

2014-02-16 Thread Chris Angelico
On Sun, Feb 16, 2014 at 11:59 PM, Rita wrote: > when I do profiling is it possible to find out if I am spending a lot of > time in type conversion? > it seems I am not. I would guess that you don't. But in Python, type conversion is like any other function call: value = int("12345") So you can

Re: inheriting a large python code base

2014-02-16 Thread Rita
when I do profiling is it possible to find out if I am spending a lot of time in type conversion? it seems I am not. Also, is it possible to predeclare a type in python? Similar to C: int i=0; On Sat, Feb 15, 2014 at 10:06 PM, Rustom Mody wrote: > On Sunday, February 16, 2014 4:45:04 AM UTC+5

Re: inheriting a large python code base

2014-02-15 Thread Rustom Mody
On Sunday, February 16, 2014 4:45:04 AM UTC+5:30, Roy Smith wrote: > In article Cameron Simpson wrote: > > On 15Feb2014 12:10, Rita wrote: > > > i just inherited a large python code base and I would like to optimize the > > > code (run faster). The application is a scientific application so I rea

Re: inheriting a large python code base

2014-02-15 Thread Roy Smith
In article , Cameron Simpson wrote: > On 15Feb2014 12:10, Rita wrote: > > i just inherited a large python code base and I would like to optimize the > > code (run faster). The application is a scientific application so I really > > don't understand the internal logic. > [...] > > One thing I w

Re: inheriting a large python code base

2014-02-15 Thread Cameron Simpson
On 15Feb2014 12:10, Rita wrote: > i just inherited a large python code base and I would like to optimize the > code (run faster). The application is a scientific application so I really > don't understand the internal logic. [...] One thing I would keep in mind is that scientific applications gen

Re: inheriting a large python code base

2014-02-15 Thread Ray Cote
ot;Rita" To: python-list@python.org Sent: Saturday, February 15, 2014 12:10:33 PM Subject: inheriting a large python code base hi all, i just inherited a large python code base and I would like to optimize the code (run faster). The application is a scientific application so I real

Re: inheriting a large python code base

2014-02-15 Thread Mark Lawrence
On 15/02/2014 17:10, Rita wrote: hi all, i just inherited a large python code base and I would like to optimize the code (run faster). The application is a scientific application so I really don't understand the internal logic. Here is what I have done so far, profile (cProfile) and was able to

inheriting a large python code base

2014-02-15 Thread Rita
hi all, i just inherited a large python code base and I would like to optimize the code (run faster). The application is a scientific application so I really don't understand the internal logic. Here is what I have done so far, profile (cProfile) and was able to see where the code was taking the