Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Re: Optimizing a string processing sub

by spurperl (Priest)
on Jan 09, 2003 at 06:00 UTC ( [id://225455]=note: print w/replies, xml ) Need Help??


in reply to Re: Optimizing a string processing sub
in thread Optimizing a string processing sub

I meant the latter, and your solution works well (see my 2nd reply to dragonchild above for some clarifications).
It also feels "right". The problem is when some char X appears in word2 and then twice in word1... Using a hash is a clever solution to this problem. I've been trying to run your algorithm on some examples, and in my head, and didn't break it yet.
It also works about 50% faster than my original version.
  • Comment on Re: Re: Optimizing a string processing sub

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://225455]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-19 01:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found