Don't ask to ask, just ask | |
PerlMonks |
Want a faster replace, Pleaseby SFLEX (Chaplain) |
on Sep 12, 2010 at 12:45 UTC ( [id://859841]=perlquestion: print w/replies, xml ) | Need Help?? |
SFLEX has asked for the wisdom of the Perl Monks concerning the following question:
I have been working on my module to speed it up and have gained a lot of speed, but I see there are still some spots I can gain a lot more. This is the code I want to speed up, I would like to have it run in a loop but those loops seems to like to eat time.
I know this will leave open tags in HTML and I dont realy care. Speed is what Im after here. The code that I made that was faster is.
But that code doesn't work off a list and I would like if it did. Update 2: Everyones post helped so ++ to all. Since the array was so small I ended up just doing this. $message =~ s/\[(\/?(?:big|h[123456]|[ou]?li?|pre|s(?:mall|trong|u[bp])|[bip]))\]/<$1>/gxo; I guess I will stick with that for now.
Back to
Seekers of Perl Wisdom
|
|