As I understand ir, using the 'i' modifier in Perl slows down the regexp code. You might benchmark using /YES/ || /yes/ instead.
You appear to be using the s operator to remove any spaces. My guess is that you can replace that with tr/ //d instead, and get a speed improvement.
Finally, it looks like the two blocks of code are identical. Can you instead check for (NO and $value not zero) or YES? to do that block of code?
--t. alexIn reply to Re: Performance revision needed
by talexb
in thread Performance revision needed
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |