mirhagk @ Mon Jan 30, 2012 1:03 pm wrote:
Also you should look into big-o-expressions and algorithm timing. The point of it is, constant increases in time are important, only increases that increase as input increases. The algorithm you choose is MUCH more important than a small 20% increase in speed by avoiding functions.
Agreed. I recently wrote a naive implementation of QT clustering (for work) that took 8 hours to run on ~2k items. I sped it up a few times and now it takes about 3 seconds to process 4k items. Both implementations were written in the same language (Java) and I didn't deliberately write the first edition to be slow in any way.