3 ms·
>Rules of Optimization: Rule 1: Don't do it. Well that explains the modern web, and a great deal of modern software.
by andrepd 8y ago
>Rules of Optimization: Rule 1: Don't do it.
Well that explains the modern web, and a great deal of modern software.
- paedupeax 8y agoThere is a huge difference between not optimizing (say, purge formatting white space from HTML) and putting out five megabyte of JavaScript junk for static website.
- hoppelhase 8y agoWell, optimization could also mean to remove unnecessary JS.
- cakebrewery 8y agoI think removing unnecessary code and generalizing redundant parts should be a given. On the other hand, early optimizations such as caching or in-lining should be avoided unless needed.
- deleted 8y ago[deleted]
- protomyth 8y agoI remember someone saying simple code implementing well selected algorithms beat optimized code implementing poor algorithms. Although, I would have to agree with your statement.
- adrianN 8y agoSelecting algorithms well is not trivial. How many people think about the difference between linear search in a small array versus just passing maps around without calling it optimization? It also doesn't matter as much if your design is a mess of abstraction and indirection that spends 95% of its time chasing pointers and inspecting maps.
- protomyth 8y agoNo, its not. Frankly, I haven't seen any tools to help which is an amazing shame. Its something that as a profession we need to be better at. > It also doesn't matter as much if your design is a mess of abstraction and indirection that spends 95% of its time chasing pointers and inspecting maps. Well, that's the other side of the problem of picking decent algorithms is picking a reasonable structure for your program.
- nerdponx 8y agoI think this rule only applies in situations where the runtime is smart and fast enough that the naive approach is fast enough for whatever you need to do.