Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Substitute 'bad words' with 'good words' according to lists

by mulander (Monk)
on Sep 26, 2005 at 05:35 UTC ( [id://495013]=note: print w/replies, xml ) Need Help??


in reply to Substitute 'bad words' with 'good words' according to lists

sk thanks for the effort of Benchmarking these codes.

We can of course assume that the wordlist will be medium sized, but the txt can get unlimited length ( of course it won't be created of bad words only ).

But I really wonder how efficient all of these methods (those that appeared in this node ) are when compared to the php code I supplied in my first writeup.

I think that php has this method built-in in the core of the language, so it could be hard to beat ( if they did not mess it up ;P ). I suppose there is not a realible way to benchmark php code vs perl code ? Or maybe am I wrong and it can be done?

Another thing, does any body know how str_replace(); exactly does it's magic while replacing those lists? How many iteration does it do? Or maybe it is done in one go?
  • Comment on Re: Substitute 'bad words' with 'good words' according to lists

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-25 08:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found