in reply to Re^3: Need to speed up many regex substitutions and somehow make them a here-doc list
in thread Need to speed up many regex substitutions and somehow make them a here-doc list

In addition to the above good tips, there is a talk by Nicholas Clark (from 2005), "When Perl is not quite fast enough", that explores some other things you can do to make your code a bit faster.

But in general, the best optimizations are by optimizing the algorithm, and also first finding out what exactly the slow parts are before you start optimizing.

  • Comment on Re^4: Need to speed up many regex substitutions and somehow make them a here-doc list