in reply to Re^2: improve performance
in thread improve performance

You may want to take a look at Devel::NYTProf for profiling your code.