Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.009 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'from:addr:yahoo.co.uk': 0.04; 'lawrence': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'language.': 0.14; 'posted': 0.15; '(assuming': 0.16; 'coordinates': 0.16; 'end).': 0.16; 'optimised': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'language': 0.16; 'wrote:': 0.18; 'bit': 0.19; 'header:User-Agent:1': 0.23; 'looks': 0.24; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'idea': 0.28; 'robert': 0.30; 'code': 0.31; 'subject:some': 0.31; 'another': 0.32; 'url:python': 0.33; 'maybe': 0.34; 'thanks': 0.36; 'hi,': 0.36; 'similar': 0.36; 'performance': 0.37; 'to:addr :python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'analyze': 0.60; 'ago.': 0.61; 'our': 0.64; 'here': 0.66; 'optimized': 0.68; 'below.': 0.71; 'heavy': 0.81; 'more?': 0.84; 'received:89': 0.85 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: squeeze out some performance Date: Mon, 09 Dec 2013 23:57:57 +0000 References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: host-89-240-172-181.as13285.net User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 In-Reply-To: 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: 25 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1386633504 news.xs4all.nl 2933 [2001:888:2000:d::a6]:32894 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:61425 On 06/12/2013 08:47, Robert Voigtländer wrote: > Hi, > > I try to squeeze out some performance of the code pasted on the link below. > http://pastebin.com/gMnqprST > > The code will be used to continuously analyze sonar sensor data. I set this up to calculate all coordinates in a sonar cone without heavy use of trigonometry (assuming that this way is faster in the end). > > I optimized as much as I could. Maybe one of you has another bright idea to squeeze out a bit more? > > Thanks > Robert > Actually for optimised code it looks very similar to some code posted here http://www.daniweb.com/software-development/python/threads/321181/python-bresenham-circle-arc-algorithm over three years ago. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence