Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin3!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.079 X-Spam-Evidence: '*H*': 0.84; '*S*': 0.00; 'subject:code': 0.07; 'facts': 0.09; 'inherited': 0.09; 'python': 0.11; 'subject:python': 0.16; 'code.': 0.18; 'all,': 0.19; 'to:name :python-list@python.org': 0.22; '---': 0.24; 'first,': 0.26; 'wondering': 0.29; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; 'anyone': 0.31; 'problem': 0.35; 'something': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'done': 0.36; 'application': 0.37; 'to:addr:python-list': 0.38; 'skip:& 20': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'profile': 0.61; 'such': 0.63; 'taking': 0.65; 'techniques': 0.66; 'here': 0.66; 'longest': 0.84; 'subject:base': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=nNEciJW2pcQEMTGbDkjSFQDkuCj/KTmn2/GXjgC5A64=; b=xDW57VBw4+Tk+H6wHYcUfHx+c7WDIPjEcjZ2iDjlLSFauR+/MOS4C7hDerCAyI5VKR fhPwF+14m/r9sIQR4Jpkd73dTXJ5vxv4paj/2kQv+ufy/Nn3pPz5gNCbB7y4qOG/KETl 5+SIt2Xbx94GDAi249gz0eb02JShksVxpGQxwwgbESry5auaAKXAXs0VWK8g7MTqf8TF wMEPMrSc+DTTf1scc1/jC8OFwYs912pBAFbU+PIJACUtHyj2gZJ+1ojeO4ELfuKHT/SJ EORvEAAs1bHuesCohOHIo+HyB5gRccYkOVtOLCJuNaRC/HsbRgunzuLJ6SOJbiQZhJe7 czXg== MIME-Version: 1.0 X-Received: by 10.182.126.167 with SMTP id mz7mr20823obb.69.1392484233500; Sat, 15 Feb 2014 09:10:33 -0800 (PST) Date: Sat, 15 Feb 2014 12:10:33 -0500 Subject: inheriting a large python code base From: Rita To: "python-list@python.org" Content-Type: multipart/alternative; boundary=001a11c1f54017e03304f2750051 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 40 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1392484241 news.xs4all.nl 2950 [2001:888:2000:d::a6]:53157 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:66459 --001a11c1f54017e03304f2750051 Content-Type: text/plain; charset=ISO-8859-1 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 longest time. I was wondering if anyone else experienced something like this and how they overcame a problem such a this...what techniques have you used to "optimize" the code. -- --- Get your facts first, then you can distort them as you please.-- --001a11c1f54017e03304f2750051 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
hi all,

i just inherited a large python= code base and I would like to optimize the code (run faster). The applicat= ion is a scientific application so I really don't understand the intern= al logic. 

Here is what I have done so far, profile (cProfile) and= was able to see where the code was taking the longest time. 

I was wondering if anyone else experienced som= ething like this and how they overcame a problem such a this…what te= chniques have you used to "optimize" the code.
 



--
--- Get your facts first, then you can distort them as you please.--
--001a11c1f54017e03304f2750051--