4 ms·
You could probably cut that consumption in half if people stopped using interpreted languages in production, quit telling curious young programmers that early o
by gameswithgo 8y ago
You could probably cut that consumption in half if people stopped using interpreted languages in production, quit telling curious young programmers that early optimization is evil or that memory is an implementation detail, etc. etc.
The computer is very efficient, electrical engineers toil and sweat a great deal to make them so. Then we build things with Ruby and Python and make things 2 orders of magnitude less efficient for, I think, no good reason. What makes those languages pleasant to use is not strictly tied to them being interpreted.
- ashelmire 8y ago> no good reason If it takes a developer hours to build something that would otherwise take days, that's a very good reason. Processing power and energy are a tiny fraction of the cost of dev time. For things where scale matters, companies switch to faster languages with more optimization. This is irrelevant for what, 95% of businesses? Granted, probably half of devs are working for big tech where it does matter, but it really doesn't for a lot of us. In any case, Javascript, which most of us are using more and more, is not that much slower than Java or other low level languages and can be used everywhere.
- aurelwu 8y ago>energy [is] a tiny fraction of the cost of dev time I think that is in a lot of cases not true, just that the developer (and his company) is not paying the bill but the buyer/user. While individually this might not be a lot, therefore the individual will not complain about it either, for applications with lot of users it will add up a lot. Let's say you have a application or a device with 1 Million Concurrent users, and you could reduce the power consumption by just 1 Watt per instance, this amounts to nearly 9000 MWh yearly, which as a total cost for end users in germany would amount to more than 2,5 Million Euro (+ the climate emissions). I am quite sure that in a lot of instances you could reduce the power usage by 1 Watt and that it would cost less than even 10% of the aggregated savings. Even simple things like game menu screens having no frame limiters and putting the GPU under heavy load have been a thing in the past (e.g. Diablo3 at some point). The issue is that the developer has no incentive to improve such things, except in the most extreme cases as he doesn't benefit from it but from a macro-economic and ecological perspective it would be beneficial.
- ashelmire 8y agoLet's be clear about this: high level languages like python and ruby in production use are doing server side web operations, most of which aren't even very intensive - the assertion that this is being offloaded to the user is false. Anything that a low level language would replace is server side. A Java web app still needs to serve the same javascript that a Ruby or Python app does. Javascript is used client side, and again, it's quite fast, with performance comparable to Java and C++ in most use cases. And a web app is basically never going to reach the cpu/gpu levels that even the lightest game coded in C++ will reach, with rare exceptions.
- WillPostForFood 8y agoIs time or energy a more scarce resource?
- gnulinux 8y ago> no good reason It's a trade-off. You can compute everything in C, or some things in python. In the former scenario you're trading off software engineering cost with computational efficiency. Since software engineering is insaaaaaanely expensive (I code stupid stuff all day and am paid $150k/y) and processors are dirt cheap compared to them, it makes a lot of sense to do some computing in python/ruby/javascript.