The lack of an SSCCE is unfortunate. Without one, we are forced to guess, and
I have little confidence in my guesses, based on past experience:
- Re^4: Fastest way to lookup a point in a set : Surprising use case where BrowserUk found Perl hashes to be way faster than an SQLite memory-based database.
- Re^2: More Betterer Game of Life : Running time reduced from 1635 seconds to 17 seconds. Tweaking the code, via a long series of micro-optimizations, reduced running time from 1635 secs to 450 secs (3.6 times faster) ... while finding a better algorithm reduced from 450 secs to 17 secs (26.5 times faster).
- The 10**21 Problem (Part I) : Running time reduced from 50 million years to one year. Many surprises along the way in this long four-part series.
From these experiences, I learnt the importance of don't assume measure and especially find a better algorithm.