| ▲ | Yoric 14 hours ago | |
The answer to that would very much be: "it depends". Yes, of course, network I/O > local I/O > most things you'll do on your CPU. But regardless, the answer is always to measure performance (through benchmarking or telemetry), find your bottlenecks, then act upon them. I recall a case in Firefox in which we were bitten by a O(n^2) algorithm running at startup, where n was the number of tabs to restore, another in which several threads were fighting each other to load components of Firefox and ended up hammering the I/O subsystem, but also cases of executable too large, data not fitting in the CPU cache, Windows requiring a disk access to normalize paths, etc. | ||
| ▲ | tombert 13 hours ago | parent [-] | |
Sure, I will admit I was a bit hyperbolic here. Obviously sometimes you need to do a CPU optimization, and I certainly do not think you should ignore big O for anything. It just feels like 90+% of the time my “optimizing” boils down to figuring out how to batch a SQL or reduce a call to Redis or something. | ||