Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #66492
| Date | 2014-02-16 09:32 +1100 |
|---|---|
| From | Cameron Simpson <cs@zip.com.au> |
| Subject | Re: inheriting a large python code base |
| References | <CAOF-KfiD=UgMg7GHiiPiT47zETJmrkicX4YTrxfh4=T2FSq64Q@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.7028.1392505094.18130.python-list@python.org> (permalink) |
On 15Feb2014 12:10, Rita <rmorgan466@gmail.com> 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
generally involve floating point math. That is subject to loss of
precision if done the wrong way.
If you are fiddling with a numeric algorithm (as opposed to plain
old data structure manipulations) I would want to be sure the code
you're changing is not done that way for a specific reason. Make
unit tests to check for correctness if possible. Make regression
tests to compare the results of your modified code against the
results from the original code on the same data.
Cheers,
--
Cameron Simpson <cs@zip.com.au>
Plague, Famine, Pestilence, and C++ stalk the land. We're doomed! Doomed!
- Simon E Spero
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Re: inheriting a large python code base Cameron Simpson <cs@zip.com.au> - 2014-02-16 09:32 +1100
Re: inheriting a large python code base Roy Smith <roy@panix.com> - 2014-02-15 18:15 -0500
Re: inheriting a large python code base Rustom Mody <rustompmody@gmail.com> - 2014-02-15 19:06 -0800
Re: inheriting a large python code base Rita <rmorgan466@gmail.com> - 2014-02-16 07:59 -0500
Re: inheriting a large python code base Chris Angelico <rosuav@gmail.com> - 2014-02-17 00:26 +1100
csiph-web