If I were you, I would benchmark my code on some corpus of data (preferably as likely to what I would use in production as possible). Check out:
from CPAN, or do a search for benchmarking. Then, when you find the slow sections of your algorithm, either optimize them in Perl, or use a module like
to speed up your code. (There are a bunch of inline modules in case you want to inline C, Assembler, Java, or whatever)