3 ms·
>In a lot of circles, especially where web developers are involved, you'll get called out for premature optimization for spending any mental energy worrying abo
by crdoconnor 11y ago
>In a lot of circles, especially where web developers are involved, you'll get called out for premature optimization for spending any mental energy worrying about memory usage or bandwidth. The idea is that computers are fast, so we can just do whatever we want, and worry about it if it becomes a problem. The result is that it becomes a problem, then gets patched up to meet whatever bare minimum performance standards the company has (or the deadline arrives and it's released unoptimized) and we end up with the absurdly heavy and resource-greedy software we see today.
IMHO, this is exactly the kind of thing Donald Knuth was approving of.
Given how cheap CPU cycles are, how expensive developers are and that faster code often means more 'unsafe' code, 97% of the time it's more economic to just have the resource-greedy software.
Plus, I've seen more than my fair share of premature optimizations that ended up actually causing performance problems and stupid bugs.
- vmorgulis 11y ago> Given how cheap CPU cycles are, how expensive developers are and that faster code often means more 'unsafe' code, 97% of the time it's more economic to just have the resource-greedy software. I agree. I run sloccount in my build system. It gives a cost for manpower. For example: Total Physical (SLOC) = 6,944 Development (Person-Months) = 18.36 Schedule Estimate (Months) = 7.55 Estimated Average Number of Developers = 2.43 Estimated Cost to Develop = $ 206,696 http://www.dwheeler.com/sloccount/ http://www.dwheeler.com/sloccount/ http://vmorgulys.github.io/stackcity/sloccount.html http://vmorgulys.github.io/stackcity/sloccount.html We should count the energy spent by inefficient programs (multiply the number of devices). It could balance that equation as the Moore's Law is ending. I guess Debian (or another distro) if more energy-efficient than Windows (or Android). Edit: beautified sloccount output