Re: Curious to see alternate approach on a search/replace via regex

Discussion in 'Python' started by Demian Brecht, Feb 7, 2013.

  1. On 2013-02-06 7:04 PM, "Steven D'Aprano"
    <> wrote:

    >I dispute those results. I think you are mostly measuring the time to
    >print the result, and I/O is quite slow.


    Good call, hadn't even considered that.

    >My tests show that using urlparse
    >is 33% faster than using regexes, and far more understandable and
    >maintainable.


    Couldn't agree more about it being more maintainable and on second thought
    would gladly give up a negligible performance hit for it.
     
    Demian Brecht, Feb 7, 2013
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. rh
    Replies:
    6
    Views:
    126
    Nick Mellor
    Feb 8, 2013
  2. Demian Brecht
    Replies:
    18
    Views:
    232
  3. Demian Brecht
    Replies:
    0
    Views:
    130
    Demian Brecht
    Feb 6, 2013
  4. MRAB
    Replies:
    0
    Views:
    114
  5. Peter Otten
    Replies:
    0
    Views:
    92
    Peter Otten
    Feb 7, 2013
Loading...

Share This Page