Once you've tackled that, if it's still not fast enough, you can probably turn your algorithm into a state machine so that you don't generate redundant B elements in the first place.
-- Randal L. Schwartz, Perl hacker
In reply to Re: foreach (@array) s/x/y/ efficiency
by merlyn
in thread foreach (@array) s/x/y/ efficiency
by gryphon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |