in reply to Re^2: improve performancein thread improve performance
You may want to take a look at Devel::NYTProf for profiling your code.