in reply to Script Executes Very Slowly

Last year, I made a talk at the French yearly Perl Conference where my subject was: "How to use efficiently Perl data structures to improve performance".

I had 3 examples. The first one was about caching known results (i.e. storing results in a hash or an array to avoid having to calculate them again), the second one was an analysis of a i-phone game (where I could reduce a potential 1,350 billion possible games to only 2.3 million actual optimal games) and the third one was an actual professional problem where I was able to divide by a factor of 1400 the runtime of the crucial part of a program through a very careful use of about a dozen Perl (mostly nested) hashes. The overall program runtime fell from about 60 days to 13 hours, but the small part of the program that created the problem ran 1400 faster (from about 59.5 days to an hour).