Also, “a Perl compiler” probably wouldn’t actually “speed it up” nearly as much as you might think. Perl, as a language system, is actually very small in size ... and very, very fast. (There is voodoo in those perlguts.) Like every interpreted language that is designed to be interpreted, the source-code is compiled in a split-second, not to executable machine code, but to an optree that is then traversed by the runtime system. A single optree node can pack a tremendous punch, or it can do very little, but it is always small. The overhead of navigating through that structure and calling the proper handlers is inconsequential. The key advantage of the optree is that it expresses the purpose of the program, the actions that are to be taken, and that it does it all indirectly. The code that implements each opcode is already ferociously optimized: you’ve got access to some top-notch code without so much as lifting a finger.
If your program is “slow,” then it is your program that is slow, and compiling that program into an assemblage of native instructions would not make it faster. Instead, profile your program to find the hot-spots ... do not “guess” where they are, and do expect to be surprised. 80% of the program’s runtime is generally spent in 20% of the code. Correctly and objectively identifying those troubled areas, and creating highly-targeted improvements based on actual measures, will yield dramatic performance improvement.