Re: Green Compiler ?

"Nils M Holm" <nmh@t3x.org>
Fri, 28 Dec 2012 09:11:23 +0100

          From comp.compilers

Related articles
[2 earlier articles]
Re: Green Compiler ? nmh@t3x.org (Nils M Holm) (2012-12-23)
Re: Green Compiler ? DrDiettrich1@aol.com (Hans-Peter Diettrich) (2012-12-24)
Re: Green Compiler ? z80eu@arcor.de (Peter Dassow) (2012-12-26)
Re: Green Compiler ? anton@mips.complang.tuwien.ac.at (2012-12-27)
Re: Green Compiler ? gah@ugcs.caltech.edu (glen herrmannsfeldt) (2012-12-28)
Re: Green Compiler ? Pidgeot18@verizon.invalid (Joshua Cranmer) (2012-12-27)
Re: Green Compiler ? nmh@t3x.org (Nils M Holm) (2012-12-28)
Re: Green Compiler ? DrDiettrich1@aol.com (Hans-Peter Diettrich) (2012-12-28)
Re: Green Compiler ? walter@bytecraft.com (Walter Banks) (2012-12-28)
Re: Green Compiler ? gah@ugcs.caltech.edu (glen herrmannsfeldt) (2012-12-28)
Re: Green Compiler ? anton@mips.complang.tuwien.ac.at (2012-12-28)
Re: Green Compiler ? gneuner2@comcast.net (George Neuner) (2012-12-28)
Re: Green Compiler ? z80eu@arcor.de (Peter Dassow) (2012-12-29)
[9 later articles]
| List of all articles for this month |

From: "Nils M Holm" <nmh@t3x.org>
Newsgroups: comp.compilers
Date: Fri, 28 Dec 2012 09:11:23 +0100
Organization: Compilers Central
References: 12-12-010 12-12-013 12-12-023
Keywords: performance
Posted-Date: 28 Dec 2012 10:23:29 EST

Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
> "Nils M Holm" <nmh@t3x.org> writes:
> >In principle, I would say that higher execution speed equals more
> >green-ness. Less time spent dissipating heat means less energy
> >consumed.
>
> If a computer runs only a given set of batch-style programs a given
> set of times, yes. But that's not how computers are used. E.g.,
> there are games that consume all the resources they are given. If the
> game code runs faster, it just means that the game has better FPS, not
> that the computer consumes less energy. There are also anti-virus
> programs etc., and even for batch-style programs, if they run faster,
> one often runs them more often. So it's not so easy.


So you are basically arguing that people always try to get the maximum
out of their resources and therefore faster code is worse. Indeed, if
this should be the case, you are right.


Your first example was games. Why does a game *have to* use the
maximum number of frames per second? When a given number of frames per
second is sufficient, in the sense that additional frames will not
make the video output any smoother, why increase the frame rate
further? Let the program sleep between frames. In this case fast code
can sleep between frames, slow code can't.


Same for virus scanner: why run them more often?


So I would argue that the issue you raise is a psychological one rather
than a technical one. When people always want to get the maximum out
of their resources, then there is no way to reduce power consumption,
except, maybe, by creating *slower* processors.


Creating slower compiler output would not help, because it will just
burn more CPU cycles to achieve less. Faster code is better, because
it achieves the same in less time. E.g.: a slow interpreter can run
the same algorithm as a fast, compiled executable. Both achieve the
same on the same CPU, but the interpreted code takes longer and hence
wastes energy. So faster code saves energy.


Of course, this point assumes that people want a fixed outcome at the
least cost, and I see that this is often not the case. It seems to
get more and more interesting though, with all those "green" processors,
and other "green" equipment around.


Bottom line: we can create the tools to save energy, but if people do
not want to save energy, nothing will help.


--
Nils M Holm < n m h @ t 3 x . o r g > www.t3x.org


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.