If you're concerned with performance and want to drop to a lower-level language to improve it, first use the Benchmark module to find out where the bottleneck really is. It's amazing how many developers skip this simple step, flailing about trying to guess at something which is easily measurable to the n'th degree.
Devel::DProf might be better in finding out where the bottleneck of an existing program is.
Benchmark seems better suited to comparative analysis of different algorithms.