Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #106658

Re: how to convert code that uses cmp to python3

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Antoon Pardon <antoon.pardon@rece.vub.ac.be>
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 <mailman.69.1460100988.2253.python-list@python.org> (permalink)
References <57064D0D.1030701@rece.vub.ac.be> <CAPTjJmrGiQS9uhFU-+TQ4nUWQ2p4gmJoQitMotS0Ob--qm1iWg@mail.gmail.com> <5706C961.2000009@rece.vub.ac.be> <CAPTjJmrbL870mV1kU8nHar=bPyKZRmhKP-8iUs_tpYVo5vhhOA@mail.gmail.com> <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 <antoon.pardon@rece.vub.ac.be>
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 <CAPTjJmrbL870mV1kU8nHar=bPyKZRmhKP-8iUs_tpYVo5vhhOA@mail.gmail.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.21
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID <57075F43.7060004@rece.vub.ac.be>
X-Mailman-Original-References <57064D0D.1030701@rece.vub.ac.be> <CAPTjJmrGiQS9uhFU-+TQ4nUWQ2p4gmJoQitMotS0Ob--qm1iWg@mail.gmail.com> <5706C961.2000009@rece.vub.ac.be> <CAPTjJmrbL870mV1kU8nHar=bPyKZRmhKP-8iUs_tpYVo5vhhOA@mail.gmail.com>
Xref csiph.com comp.lang.python:106658

Show key headers only | View raw


Op 08-04-16 om 00:21 schreef Chris Angelico:
> On Fri, Apr 8, 2016 at 6:56 AM, Antoon Pardon
> <antoon.pardon@rece.vub.ac.be> 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

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: how to convert code that uses cmp to python3 Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2016-04-08 09:35 +0200
  Re: how to convert code that uses cmp to python3 Steven D'Aprano <steve@pearwood.info> - 2016-04-08 21:56 +1000

csiph-web