Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Antoon Pardon Newsgroups: comp.lang.python Subject: Re: how to convert code that uses cmp to python3 Date: Fri, 8 Apr 2016 09:35:31 +0200 Lines: 15 Message-ID: References: <57064D0D.1030701@rece.vub.ac.be> <5706C961.2000009@rece.vub.ac.be> <57075F43.7060004@rece.vub.ac.be> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de KIaR+ge/xlPoZ7AA4nSG6Al9HrVQ+UHYBa5wtFNFs9dQ== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.026 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'python3': 0.05; 'received:134': 0.05; 'subject:code': 0.07; '2016': 0.16; '6:56': 0.16; 'received:ac.be': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:python3': 0.16; 'worse.': 0.16; 'wrote:': 0.16; 'changes': 0.20; 'am,': 0.23; 'header:In-Reply- To:1': 0.24; 'header:User-Agent:1': 0.26; 'chris': 0.26; 'fri,': 0.27; 'forces': 0.29; 'subject:that': 0.29; 'code': 0.30; 'received:be': 0.30; 'probably': 0.31; 'but': 0.36; 'to:addr :python-list': 0.36; 'subject:: ': 0.37; 'mean': 0.38; 'to:addr:python.org': 0.40; "you'll": 0.61; 'more': 0.63; '100%': 0.72; 'angelico:': 0.84; 'chrisa': 0.84; 'optimized.': 0.84; 'pardon': 0.84; 'schreef': 0.84 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiENAHxeB1eGuA9G/2dsb2JhbABdhFMBM7xHhg0CggUBAQEBAQFmhGkBAQQjVRELGAICBRYLAgIJAwIBAgFFEwYCAheIDLA3jTSEWgEBCAIefIUlhEuFC4I0glYBBJgEgVSMOIFRh1qFYo8lYoNpagGJOAEBAQ User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.7.0 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <57075F43.7060004@rece.vub.ac.be> X-Mailman-Original-References: <57064D0D.1030701@rece.vub.ac.be> <5706C961.2000009@rece.vub.ac.be> Xref: csiph.com comp.lang.python:106658 Op 08-04-16 om 00:21 schreef Chris Angelico: > On Fri, Apr 8, 2016 at 6:56 AM, Antoon Pardon > wrote: >> That solution will mean I will have to do about 100% more comparisons >> than previously. > Try it regardless. You'll probably find that performance is fine. > Don't prematurely optimize! > > ChrisA But it was already working and optimized. The python3 approach forces me to make changes to working code and make the performance worse. -- Antoon Pardon