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


Groups > comp.lang.python > #51007

Re: Find and Replace Simplification

Path csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <joshua.landau.ws@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.194
X-Spam-Level *
X-Spam-Evidence '*H*': 0.66; '*S*': 0.04; 'string': 0.09; 'builtin': 0.09; 'cc:addr:python-list': 0.11; 'rebuild': 0.16; 'sender:addr:gmail.com': 0.17; 'wrote:': 0.18; 'not,': 0.20; 'seems': 0.21; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; 'faster,': 0.31; 'received:google.com': 0.35; 'i.e.': 0.36; 'should': 0.36; 'too': 0.37; '8bit%:86': 0.38; 'mapping': 0.38; 'does': 0.39; 'analyze': 0.60; 'most': 0.60; 'real': 0.63; 'such': 0.63; 'july': 0.63; 'to:addr:gmail.com': 0.65; 'overall': 0.69; 'theoretical': 0.74; '.replace': 0.84; 'subject:skip:S 10': 0.84; '2013': 0.98
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=DA4y0EVwdP00vXTtsNM6eQTOO1lDCEIw5uJ7Harr0Fw=; b=XfasqeIfyHEozJ6MxTW9/fYtKaiMHvUY6IEb/DD2ib2rJtErKHcByi3lEUEZ2PWb76 FeKO5NEk2QCsyt+lzJRvuMUqUz5aJVZbCvuVsPpdBW+E0YMPdWP0ODqhbNG98l8u0nIy HZqr/Q/6VHlEnlcucFQ9+T8wN0AaIqBC1ze6PYEt0dYibT/VBQBZiNOB0pUuOicW0WM+ MNUMfEJ1AbljezPHSvAxokchOOn3d3+rsx04cAVFT0h4Zzvk8nKplgqpe3aSg9ppiw2e /ReU79bJRu5W4lfuPQ2e3R4lrMlQYj7raEurG6GXrGfz+40N7e0seKu1EJEKFoDXiUoV eeCg==
X-Received by 10.152.88.78 with SMTP id be14mr10675923lab.19.1374406206825; Sun, 21 Jul 2013 04:30:06 -0700 (PDT)
MIME-Version 1.0
Sender joshua.landau.ws@gmail.com
In-Reply-To <ksg3gh$ts9$1@ger.gmane.org>
References <mailman.4865.1374240179.3114.python-list@python.org> <51e967bb$0$29971$c3e8da3$5496439d@news.astraweb.com> <ksbt1a$5q1$1@ger.gmane.org> <CAN1F8qXttLWtMFDED-+gEdOR_5tZmDKtqDsF2kdojCRSMAn7eg@mail.gmail.com> <ksdtu7$ctm$1@ger.gmane.org> <CAN1F8qVv0N1D=JEkvWeQePhZg7fT7ULPPXp+ZTOmu=wQCzXiHQ@mail.gmail.com> <ksg3gh$ts9$1@ger.gmane.org>
From Joshua Landau <joshua@landau.ws>
Date Sun, 21 Jul 2013 12:29:26 +0100
X-Google-Sender-Auth LwdoTBvsnU9TBOTRAJ3dTszs-K8
Subject Re: Find and Replace Simplification
To Serhiy Storchaka <storchaka@gmail.com>
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding quoted-printable
Cc python-list <python-list@python.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.4949.1374406214.3114.python-list@python.org> (permalink)
Lines 16
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1374406214 news.xs4all.nl 15985 [2001:888:2000:d::a6]:58508
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:51007

Show key headers only | View raw


On 21 July 2013 08:44, Serhiy Storchaka <storchaka@gmail.com> wrote:
> 20.07.13 20:03, Joshua Landau написав(ла):
>
>> Still, it seems to me that it should be optimizable for sensible
>> builtin types such that .translate is significantly faster, as there's
>> no theoretical extra work that .translate *has* to do that .replace
>> does not, and .replace also has to rebuild the string a lot of times.
>
> You should analyze overall mapping and reorder items in right order (if it
> possible), i.e. '&' should be replaced before '<' in html.escape. This extra
> work is too large for most real input.

I don't understand. What items are you reordering?

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


Thread

Find and Replace Simplification Devyn Collier Johnson <devyncjohnson@gmail.com> - 2013-07-19 09:22 -0400
  Re: Find and Replace Simplification Novocastrian_Nomad <gregory.j.baker@gmail.com> - 2013-07-19 06:38 -0700
  Re: Find and Replace Simplification John Gordon <gordon@panix.com> - 2013-07-19 14:28 +0000
  Re: Find and Replace Simplification Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-07-19 16:22 +0000
    Re: Find and Replace Simplification Serhiy Storchaka <storchaka@gmail.com> - 2013-07-19 20:29 +0300
    Re: Find and Replace Simplification Skip Montanaro <skip@pobox.com> - 2013-07-19 13:08 -0500
    Re: Find and Replace Simplification Devyn Collier Johnson <devyncjohnson@gmail.com> - 2013-07-19 17:44 -0400
    Re: Find and Replace Simplification Dave Angel <davea@davea.name> - 2013-07-19 18:45 -0400
    Re: Find and Replace Simplification Joshua Landau <joshua@landau.ws> - 2013-07-20 12:16 +0100
    Re: Find and Replace Simplification Serhiy Storchaka <storchaka@gmail.com> - 2013-07-20 14:48 +0300
    Re: Find and Replace Simplification Serhiy Storchaka <storchaka@gmail.com> - 2013-07-20 14:57 +0300
    Re: Find and Replace Simplification Devyn Collier Johnson <devyncjohnson@gmail.com> - 2013-07-20 08:41 -0400
    Re: Find and Replace Simplification Devyn Collier Johnson <devyncjohnson@gmail.com> - 2013-07-20 08:50 -0400
    Re: Find and Replace Simplification Joshua Landau <joshua@landau.ws> - 2013-07-20 18:03 +0100
    Re: Find and Replace Simplification Dave Angel <davea@davea.name> - 2013-07-20 14:04 -0400
    Re: Find and Replace Simplification Joshua Landau <joshua@landau.ws> - 2013-07-20 19:37 +0100
    Re: Find and Replace Simplification Joshua Landau <joshua@landau.ws> - 2013-07-20 19:41 +0100
    Re: Find and Replace Simplification Dave Angel <davea@davea.name> - 2013-07-20 17:56 -0400
    Re: Find and Replace Simplification Joshua Landau <joshua@landau.ws> - 2013-07-20 23:33 +0100
    Re: Find and Replace Simplification Serhiy Storchaka <storchaka@gmail.com> - 2013-07-21 10:44 +0300
    Re: Find and Replace Simplification Joshua Landau <joshua@landau.ws> - 2013-07-21 12:29 +0100
    Re: Find and Replace Simplification Serhiy Storchaka <storchaka@gmail.com> - 2013-07-21 15:28 +0300
    Re: Find and Replace Simplification Joshua Landau <joshua@landau.ws> - 2013-07-21 13:49 +0100

csiph-web