6 ms·
The only thing you need to know when it comes to optimising code is very simple: You can never make code run faster. You can only make it do less.
by onion2k 9y ago
The only thing you need to know when it comes to optimising code is very simple: You can never make code run faster. You can only make it do less.
- creatornator 9y agoI think with modern processor architectures there are some edge cases where you can shuffle calls around, keep the same runtime complexity, but have things go faster. For example, moving a conditional outside an inner loop function call to inside the function can cause the entire function to be loaded into cache, decreasing runtime.