3 ms·
1. Modern CPUs have "mini OS-es in them", difference between two generations of CPUs from the same manufacturer, even two models in the same genration, can mean
by rubber_duck 10y ago
1. Modern CPUs have "mini OS-es in them", difference between two generations of CPUs from the same manufacturer, even two models in the same genration, can mean that approach A is faster than approach B, let alone cross platform and cross architecture optimization.
2. Stuff you're running is usually not running in a vacuum but as a part of a bigger system, up front micro optimizing without measuring is again blind guessing which ends up being wrong and a waste of time.
Micro optimization is a relic of the past, something that embedded/console/driver developers working on specific hardware need to care about - for the rest this stuff it's just a pointless guessing game - I've seen a few old C developers stuck in their ways try to do this to look smart and when you actually go to measure it ended up being wrong because their assumptions are outdated. Spending your time on high level system optimization seems much more worth while (picking the right algorithms, exposing the right kind of interfaces for efficient consumption, etc.).
- doctorpangloss 10y ago> embedded/console/driver developers working on specific hardware need to care about In other words, things that great engineers need to care about :) I'm not an embedded developer, but to reiterate, I'm just advocating for a focus on performance if you aspire to be a great engineer. This is different than being a great businessperson, or a great software developer kit / library designer.
- rubber_duck 10y ago>In other words, things that great engineers need to care about :) Really ? I feel like most cutting edge engineering is done in building distributed systems, ML, high performance computing, etc. Micro optimization is where it was last century.
- quickben 10y agoThat is just what gets most advertisement time these days. It sells well as a news item. AI, ML, self driving cars. But, when you have to ship 50k IOT devices and they have to be under $20. Your bosses will squeeze you for every ounce of optimization.
- rubber_duck 10y ago>But, when you have to ship 50k IOT devices and they have to be under $20. You're working on couple M $ project total ? Meanwhile a guy shaving off a % off performance in a FB data center saves them millions a year in power consumption alone.
- quickben 10y agoI don't see us in disagreement then. I took the IOT one as illustration. But even the current project, isn't that big, and they do want properly done job.
- rubber_duck 10y agoBut FB guys don't micro optimize (they use PHP FFS), they measure production systems and look for bottlenecks. Premature optimization is a gut feeling based guessing game not quality engineering.
- bertr4nd 10y agoFB engineer here; worked on HHVM for several years. We absolutely do "micro-optimize", e.g., our string hashing code is written in hand-tuned assembly. Where we apply those optimizations is, of course, driven by profiling, so those statements aren't entirely in conflict.
- rubber_duck 10y agoWell they are in the context - the article talks about premature optimization - and the OP argues you should micro optimize to be a good engineer. What I'm saying is the only way to do optimization correctly is by doing the things you and everyone else is doing when it matters - measure before and after - the rest is just assumptions that rarely pan out the way you expect them to - at least that's my experience with optimization when I was still doing game dev. You can really do micro optimization up-front