<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">On Fri, Dec 6, 2013 at 2:38 PM, Mark Lawrence <span dir="ltr"><<a href="mailto:breamoreboy@yahoo.co.uk" target="_blank">breamoreboy@yahoo.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 06/12/2013 16:52, John Ladasky wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Friday, December 6, 2013 12:47:54 AM UTC-8, Robert Voigtländer wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I try to squeeze out some performance of the code pasted on the link below.<br>
<a href="http://pastebin.com/gMnqprST" target="_blank">http://pastebin.com/gMnqprST</a><br>
</blockquote>
<br>
Several comments:<br>
<br>
1) I find this program to be very difficult to read, largely because there's a whole LOT of duplicated code.  Look at lines 53-80, and lines 108-287, and lines 294-311.  It makes it harder to see what this algorithm actually does.  Is there a way to refactor some of this code to use some shared function calls?<br>

<br>
</blockquote>
<br></div>
A handy tool for detecting duplicated code here <a href="http://clonedigger.sourceforge.net/" target="_blank">http://clonedigger.sourceforge.net/</a> for anyone who's interested.<br></blockquote><div><br></div><div>Pylint does this too...<br>
 <br></div></div></div></div>