3 ms·
"Optimization anywhere besides the bottleneck is an illusion"
by nhumrich 4y ago
"Optimization anywhere besides the bottleneck is an illusion"
- mianos 4y agoI often hear this and some other one about 'premature optimisation is evil or such'. While it is very true that spending a whole heap of time optimising something that never needs it is a huge waste of time, spending the extra time and effort to use an optimised data structure when you have a high confidence that something will actually grow is time well spent up front. In some domains, like financial trading systems, using a linear list and hoping it stays small or all fits in the cache is simply naive. An mature developer would never say 'premature optimisation is wrong' and laugh at people who waste a lot of time optimising instead of focussing on functionality. A very experienced developer would stop and look at the problem at hand and make an educated guess whether to optimise at this stage and not.
- sterlind 4y agodo scale testing across all the parameters that can grow. profile and see where the bottlenecks occur. whack and repeat until your benchmarks are acceptable for whatever you're anticipating.