Well, then. On each machine, install the version of everything (or one thing at a time) mentioned above that exists on the other machine, and see if the programm gets faster or slower. Yes, it involves work.
Well, that would be great but I don't think I would be able to install the RPMs from RHEL6 on a RHEL4 and vice versa without a huge amount of RPM dependency issues... expecially with Perl.