News for hackers. Stuff that matters.
Re:The 'premature optimization is evil' myth (2010) by crdoconnor on Monday March 14, 2016 @04:27PM (#11285332)
>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.

Re:The 'premature optimization is evil' myth (2010) by vmorgulis on Monday March 14, 2016 @04:56PM (#11285524)
> 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://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