4 ms·
IMO 1. Make it correct and not insane asymptotically. 2. Tune constant factors, if you need to. In school I was confused why they kept on talking about asymp
by Ericson2314 6y ago
IMO
1. Make it correct and not insane asymptotically.
2. Tune constant factors, if you need to.
In school I was confused why they kept on talking about asymptotics and ignoring the different costs of the building blocks. Now I see that, while it is true that asymptotic analysis doesn't well explain performance when "things are good":
1. There are a lot of stupid things people do write that it does catch.
2. Since it is scale free, it makes sense as a way to evaluate programs throughout their entire development.
3. Constant factor optimizations will always tempt one to ruin abstraction boundaries, but asymptotic analysis shouldn't----or if it does, sorry your abstraction sucks and needs to go. (Hi ORMs.)
The latter points are really powerful. Never make me work without efficient tree map/set union and intersection ever again.