Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #82395 > unrolled thread
| Started by | Lynn McGuire <lynnmcguire5@gmail.com> |
|---|---|
| First post | 2021-11-22 16:19 -0600 |
| Last post | 2021-12-06 16:21 +0100 |
| Articles | 20 on this page of 93 — 22 participants |
Back to article view | Back to comp.lang.c++
"C Is The Greenest Programming Language" by: Chris Lott Lynn McGuire <lynnmcguire5@gmail.com> - 2021-11-22 16:19 -0600
Re: "C Is The Greenest Programming Language" by: Chris Lott "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-11-22 14:58 -0800
Re: "C Is The Greenest Programming Language" by: Chris Lott Juha Nieminen <nospam@thanks.invalid> - 2021-11-23 07:10 +0000
Re: "C Is The Greenest Programming Language" by: Chris Lott "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-11-23 13:12 -0800
Re: "C Is The Greenest Programming Language" by: Chris Lott Juha Nieminen <nospam@thanks.invalid> - 2021-11-24 10:54 +0000
Re: "C Is The Greenest Programming Language" by: Chris Lott Philipp Klaus Krause <pkk@spth.de> - 2021-11-24 12:01 +0100
Re: "C Is The Greenest Programming Language" by: Chris Lott David Brown <david.brown@hesbynett.no> - 2021-11-24 13:58 +0100
Re: "C Is The Greenest Programming Language" by: Chris Lott "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-11-23 13:23 -0800
Re: "C Is The Greenest Programming Language" by: Chris Lott Richard Damon <Richard@Damon-Family.org> - 2021-11-22 18:25 -0500
Re: "C Is The Greenest Programming Language" by: Chris Lott Juha Nieminen <nospam@thanks.invalid> - 2021-11-23 07:21 +0000
Re: "C Is The Greenest Programming Language" by: Chris Lott Guillaume <message@bottle.org> - 2021-11-23 17:56 +0100
Re: "C Is The Greenest Programming Language" by: Chris Lott Juha Nieminen <nospam@thanks.invalid> - 2021-11-24 10:55 +0000
Re: "C Is The Greenest Programming Language" by: Chris Lott Öö Tiib <ootiib@hot.ee> - 2021-11-24 05:54 -0800
Re: "C Is The Greenest Programming Language" by: Chris Lott Lynn McGuire <lynnmcguire5@gmail.com> - 2021-11-23 19:00 -0600
Re: "C Is The Greenest Programming Language" by: Chris Lott scott@slp53.sl.home (Scott Lurndal) - 2021-11-24 16:04 +0000
Re: "C Is The Greenest Programming Language" by: Chris Lott Tim Rentsch <tr.17687@z991.linuxsc.com> - 2021-12-16 07:55 -0800
Re: "C Is The Greenest Programming Language" by: Chris Lott legalize+jeeves@mail.xmission.com (Richard) - 2021-12-16 16:24 +0000
Re: "C Is The Greenest Programming Language" by: Chris Lott Tim Rentsch <tr.17687@z991.linuxsc.com> - 2021-12-16 19:46 -0800
Re: "C Is The Greenest Programming Language" by: Chris Lott Juha Nieminen <nospam@thanks.invalid> - 2021-12-17 06:30 +0000
Re: "C Is The Greenest Programming Language" by: Chris Lott Tim Rentsch <tr.17687@z991.linuxsc.com> - 2021-12-18 07:45 -0800
Re: "C Is The Greenest Programming Language" by: Chris Lott legalize+jeeves@mail.xmission.com (Richard) - 2021-12-30 12:01 +0000
Re: "C Is The Greenest Programming Language" by: Chris Lott Tim Rentsch <tr.17687@z991.linuxsc.com> - 2022-01-16 12:22 -0800
Re: "C Is The Greenest Programming Language" by: Chris Lott legalize+jeeves@mail.xmission.com (Richard) - 2022-01-17 21:28 +0000
Re: "C Is The Greenest Programming Language" by: Chris Lott Tim Rentsch <tr.17687@z991.linuxsc.com> - 2022-01-17 15:48 -0800
Re: "C Is The Greenest Programming Language" by: Chris Lott legalize+jeeves@mail.xmission.com (Richard) - 2022-01-18 06:47 +0000
Re: "C Is The Greenest Programming Language" by: Chris Lott Philipp Klaus Krause <pkk@spth.de> - 2021-11-24 11:43 +0100
Re: "C Is The Greenest Programming Language" by: Chris Lott om@iki.fi (Otto J. Makela) - 2021-11-23 14:17 +0200
Re: "C Is The Greenest Programming Language" by: Chris Lott DozingDog@thekennel.co - 2021-11-23 16:53 +0000
Re: "C Is The Greenest Programming Language" by: Chris Lott om@iki.fi (Otto J. Makela) - 2021-11-24 11:40 +0200
Re: "C Is The Greenest Programming Language" by: Chris Lott DozingDog@thekennel.co - 2021-11-24 15:49 +0000
Re: "C Is The Greenest Programming Language" by: Chris Lott Lynn McGuire <lynnmcguire5@gmail.com> - 2021-11-23 19:01 -0600
Re: "C Is The Greenest Programming Language" by: Chris Lott om@iki.fi (Otto J. Makela) - 2021-11-24 11:33 +0200
Re: "C Is The Greenest Programming Language" by: Chris Lott Lynn McGuire <lynnmcguire5@gmail.com> - 2021-11-24 15:28 -0600
Re: "C Is The Greenest Programming Language" by: Chris Lott Bonita Montero <Bonita.Montero@gmail.com> - 2021-11-23 14:39 +0100
Re: "C Is The Greenest Programming Language" by: Chris Lott DozingDog@thekennel.co - 2021-11-23 16:55 +0000
Re: "C Is The Greenest Programming Language" by: Chris Lott Richard Damon <Richard@Damon-Family.org> - 2021-11-23 12:28 -0500
Re: "C Is The Greenest Programming Language" by: Chris Lott Bonita Montero <Bonita.Montero@gmail.com> - 2021-11-23 19:05 +0100
Re: "C Is The Greenest Programming Language" by: Chris Lott Richard Damon <Richard@Damon-Family.org> - 2021-11-23 13:41 -0500
Re: "C Is The Greenest Programming Language" by: Chris Lott Bonita Montero <Bonita.Montero@gmail.com> - 2021-11-23 19:53 +0100
Re: "C Is The Greenest Programming Language" by: Chris Lott Richard Damon <Richard@Damon-Family.org> - 2021-11-23 21:27 -0500
Re: "C Is The Greenest Programming Language" by: Chris Lott Bonita Montero <Bonita.Montero@gmail.com> - 2021-11-24 18:32 +0100
Re: "C Is The Greenest Programming Language" by: Chris Lott Richard Damon <Richard@Damon-Family.org> - 2021-11-24 12:54 -0500
Re: "C Is The Greenest Programming Language" by: Chris Lott Bonita Montero <Bonita.Montero@gmail.com> - 2021-11-24 20:52 +0100
Re: "C Is The Greenest Programming Language" by: Chris Lott Richard Damon <Richard@Damon-Family.org> - 2021-11-24 15:13 -0500
Re: "C Is The Greenest Programming Language" by: Chris Lott Bonita Montero <Bonita.Montero@gmail.com> - 2021-11-25 19:13 +0100
Re: "C Is The Greenest Programming Language" by: Chris Lott DozingDog@thekennel.co - 2021-11-24 15:48 +0000
Re: "C Is The Greenest Programming Language" by: Chris Lott Richard Damon <Richard@Damon-Family.org> - 2021-11-24 11:54 -0500
Re: "C Is The Greenest Programming Language" by: Chris Lott DozingDog@thekennel.co - 2021-11-25 11:19 +0000
Re: "C Is The Greenest Programming Language" by: Chris Lott Juha Nieminen <nospam@thanks.invalid> - 2021-11-25 11:46 +0000
Re: "C Is The Greenest Programming Language" by: Chris Lott DozingDog@thekennel.co - 2021-11-25 15:57 +0000
Re: "C Is The Greenest Programming Language" by: Chris Lott Richard Damon <Richard@Damon-Family.org> - 2021-11-25 07:04 -0500
Re: "C Is The Greenest Programming Language" by: Chris Lott DozingDog@thekennel.co - 2021-11-25 15:59 +0000
Re: "C Is The Greenest Programming Language" by: Chris Lott Manfred <noname@add.invalid> - 2021-11-23 16:03 +0100
Re: "C Is The Greenest Programming Language" by: Chris Lott gazelle@shell.xmission.com (Kenny McCormack) - 2021-11-23 15:50 +0000
Re: "C Is The Greenest Programming Language" by: Chris Lott David Brown <david.brown@hesbynett.no> - 2021-11-23 17:51 +0100
Re: "C Is The Greenest Programming Language" by: Chris Lott DozingDog@thekennel.co - 2021-11-23 17:00 +0000
Re: "C Is The Greenest Programming Language" by: Chris Lott Richard Damon <Richard@Damon-Family.org> - 2021-11-23 12:36 -0500
Re: "C Is The Greenest Programming Language" by: Chris Lott David Brown <david.brown@hesbynett.no> - 2021-11-23 19:24 +0100
Re: "C Is The Greenest Programming Language" by: Chris Lott Richard Damon <Richard@Damon-Family.org> - 2021-11-23 13:50 -0500
Re: "C Is The Greenest Programming Language" by: Chris Lott David Brown <david.brown@hesbynett.no> - 2021-11-23 20:02 +0100
Re: "C Is The Greenest Programming Language" by: Chris Lott Manfred <noname@add.invalid> - 2021-11-23 20:59 +0100
Re: "C Is The Greenest Programming Language" by: Chris Lott Bart <bc@freeuk.com> - 2021-11-23 20:50 +0000
Re: "C Is The Greenest Programming Language" by: Chris Lott Ian Collins <ian-news@hotmail.com> - 2021-11-24 11:18 +1300
Re: "C Is The Greenest Programming Language" by: Chris Lott Bart <bc@freeuk.com> - 2021-11-23 22:58 +0000
Re: "C Is The Greenest Programming Language" by: Chris Lott David Brown <david.brown@hesbynett.no> - 2021-11-23 23:46 +0100
Re: "C Is The Greenest Programming Language" by: Chris Lott Bart <bc@freeuk.com> - 2021-11-24 13:59 +0000
Re: "C Is The Greenest Programming Language" by: Chris Lott antispam@math.uni.wroc.pl - 2021-12-11 13:25 +0000
Re: "C Is The Greenest Programming Language" by: Chris Lott Bart <bc@freeuk.com> - 2021-12-11 14:54 +0000
Re: "C Is The Greenest Programming Language" by: Chris Lott Manfred <noname@add.invalid> - 2021-11-25 12:12 +0100
Re: "C Is The Greenest Programming Language" by: Chris Lott David Brown <david.brown@hesbynett.no> - 2021-11-23 23:35 +0100
Re: "C Is The Greenest Programming Language" by: Chris Lott Manfred <noname@add.invalid> - 2021-11-24 15:30 +0100
Re: "C Is The Greenest Programming Language" by: Chris Lott Bart <bc@freeuk.com> - 2021-11-24 14:43 +0000
Re: "C Is The Greenest Programming Language" by: Chris Lott Manfred <noname@add.invalid> - 2021-11-23 20:29 +0100
Re: "C Is The Greenest Programming Language" by: Chris Lott Bart <bc@freeuk.com> - 2021-11-23 16:14 +0000
Re: "C Is The Greenest Programming Language" by: Chris Lott Philipp Klaus Krause <pkk@spth.de> - 2021-11-24 11:56 +0100
Re: "C Is The Greenest Programming Language" by: Chris Lott Öö Tiib <ootiib@hot.ee> - 2021-11-24 06:03 -0800
Re: "C Is The Greenest Programming Language" by: Chris Lott Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-11-24 10:14 -0800
Re: "C Is The Greenest Programming Language" by: Chris Lott David Brown <david.brown@hesbynett.no> - 2021-11-24 19:55 +0100
Re: "C Is The Greenest Programming Language" by: Chris Lott Philipp Klaus Krause <pkk@spth.de> - 2021-11-24 21:13 +0100
Re: "C Is The Greenest Programming Language" by: Chris Lott Philipp Klaus Krause <pkk@spth.de> - 2021-11-24 21:11 +0100
Re: "C Is The Greenest Programming Language" by: Chris Lott Philipp Klaus Krause <pkk@spth.de> - 2021-11-24 21:17 +0100
Re: "C Is The Greenest Programming Language" by: Chris Lott Bart <bc@freeuk.com> - 2021-11-24 20:42 +0000
Re: "C Is The Greenest Programming Language" by: Chris Lott Philipp Klaus Krause <pkk@spth.de> - 2021-11-24 23:25 +0100
Re: "C Is The Greenest Programming Language" by: Chris Lott antispam@math.uni.wroc.pl - 2021-12-11 14:07 +0000
Re: "C Is The Greenest Programming Language" by: Chris Lott Bart <bc@freeuk.com> - 2021-12-11 18:46 +0000
[OT] Lisp. Was: "C Is The Greenest Programming Language" by: Chris Lott Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-12-11 20:11 +0000
Re: "C Is The Greenest Programming Language" by: Chris Lott "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-11-24 14:12 -0800
Re: "C Is The Greenest Programming Language" by: Chris Lott Manfred <noname@add.invalid> - 2021-11-25 12:00 +0100
Re: "C Is The Greenest Programming Language" by: Chris Lott Paavo Helde <eesnimi@osa.pri.ee> - 2021-12-05 22:51 +0200
Re: "C Is The Greenest Programming Language" by: Chris Lott "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-12-05 19:20 -0800
Re: "C Is The Greenest Programming Language" by: Chris Lott Manfred <noname@add.invalid> - 2021-12-06 12:28 +0100
Re: "C Is The Greenest Programming Language" by: Chris Lott Paavo Helde <eesnimi@osa.pri.ee> - 2021-12-06 13:40 +0200
Re: "C Is The Greenest Programming Language" by: Chris Lott Bonita Montero <Bonita.Montero@gmail.com> - 2021-12-06 16:21 +0100
Page 1 of 5 [1] 2 3 4 5 Next page →
| From | Lynn McGuire <lynnmcguire5@gmail.com> |
|---|---|
| Date | 2021-11-22 16:19 -0600 |
| Subject | "C Is The Greenest Programming Language" by: Chris Lott |
| Message-ID | <snh51g$c1q$1@dont-email.me> |
"C Is The Greenest Programming Language" by: Chris Lott
https://hackaday.com/2021/11/18/c-is-the-greenest-programming-language/
"Have you ever wondered if there is a correlation between a computer’s
energy consumption and the choice of programming languages? Well, a
group Portuguese university researchers did and set out to quantify it.
Their 2017 research paper entitled Energy Efficiency across Programming
Languages / How Do Energy, Time, and Memory Relate? may have escaped
your attention, as it did ours."
https://greenlab.di.uminho.pt/wp-content/uploads/2017/10/sleFinal.pdf
"Abstract: This paper presents a study of the runtime, memory usage and
energy consumption of twenty seven well-known soft- ware languages. We
monitor the performance of such lan- guages using ten different
programming problems, expressed in each of the languages. Our results
show interesting find- ings, such as, slower/faster languages consuming
less/more energy, and how memory usage influences energy consump- tion.
We show how to use our results to provide software engineers support to
decide which language to use when energy efficiency is a concern."
Lynn
[toc] | [next] | [standalone]
| From | "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> |
|---|---|
| Date | 2021-11-22 14:58 -0800 |
| Message-ID | <snh7bj$qjj$1@dont-email.me> |
| In reply to | #82395 |
On 11/22/2021 2:19 PM, Lynn McGuire wrote: > "C Is The Greenest Programming Language" by: Chris Lott > https://hackaday.com/2021/11/18/c-is-the-greenest-programming-language/ > > "Have you ever wondered if there is a correlation between a computer’s > energy consumption and the choice of programming languages? Well, a > group Portuguese university researchers did and set out to quantify it. > Their 2017 research paper entitled Energy Efficiency across Programming > Languages / How Do Energy, Time, and Memory Relate? may have escaped > your attention, as it did ours." > https://greenlab.di.uminho.pt/wp-content/uploads/2017/10/sleFinal.pdf > > "Abstract: This paper presents a study of the runtime, memory usage and > energy consumption of twenty seven well-known soft- ware languages. We > monitor the performance of such lan- guages using ten different > programming problems, expressed in each of the languages. Our results > show interesting find- ings, such as, slower/faster languages consuming > less/more energy, and how memory usage influences energy consump- tion. > We show how to use our results to provide software engineers support to > decide which language to use when energy efficiency is a concern." Interesting. However, I can write something in C that uses all CPU's 100%. So, green okay... What is it doing, is another matter, so to speak?
[toc] | [prev] | [next] | [standalone]
| From | Juha Nieminen <nospam@thanks.invalid> |
|---|---|
| Date | 2021-11-23 07:10 +0000 |
| Message-ID | <sni44d$1l1s$1@gioia.aioe.org> |
| In reply to | #82396 |
In comp.lang.c++ Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote: > Interesting. However, I can write something in C that uses all CPU's > 100%. I don't think that's the point.
[toc] | [prev] | [next] | [standalone]
| From | "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> |
|---|---|
| Date | 2021-11-23 13:12 -0800 |
| Message-ID | <snjlgi$h25$1@dont-email.me> |
| In reply to | #82398 |
On 11/22/2021 11:10 PM, Juha Nieminen wrote: > In comp.lang.c++ Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote: >> Interesting. However, I can write something in C that uses all CPU's >> 100%. > > I don't think that's the point. > Humm... I was just thinking along the lines of 'what does the C code actually do?' If it ends up blasting the system, how green is it? Well, yeah, that is a different point. You are right Juha.
[toc] | [prev] | [next] | [standalone]
| From | Juha Nieminen <nospam@thanks.invalid> |
|---|---|
| Date | 2021-11-24 10:54 +0000 |
| Message-ID | <snl5k6$1ges$1@gioia.aioe.org> |
| In reply to | #82425 |
In comp.lang.c++ Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote: > On 11/22/2021 11:10 PM, Juha Nieminen wrote: >> In comp.lang.c++ Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote: >>> Interesting. However, I can write something in C that uses all CPU's >>> 100%. >> >> I don't think that's the point. >> > > Humm... I was just thinking along the lines of 'what does the C code > actually do?' If it ends up blasting the system, how green is it? Well, > yeah, that is a different point. You are right Juha. I am assuming that the article considers the cases where the CPU is at full load in all the cases, with the program having been implemented with different programming languages. The faster the program is done, the less overall energy it will require. If a C program does the job in 1 second and a PHP program does it in 30 seconds, it's obvious that the C program is going to consume less energy for the same task. So it's not a question of "how many % of the CPU can I use with this programming language", but "how long do I need to use the CPU in order to perform this task".
[toc] | [prev] | [next] | [standalone]
| From | Philipp Klaus Krause <pkk@spth.de> |
|---|---|
| Date | 2021-11-24 12:01 +0100 |
| Message-ID | <snl62r$98t$1@solani.org> |
| In reply to | #82441 |
Am 24.11.21 um 11:54 schrieb Juha Nieminen: > > So it's not a question of "how many % of the CPU can I use with this > programming language", but "how long do I need to use the CPU in > order to perform this task". > On the other hand, the energy consumption of that CPU during that time also depends on what it is doing (and to some degree an what data it is processing). People have been doing side-channel attacks on cryptography by very accurately measuring the energy consumption of the computers doing the encrypting or decrypting. Long ago, for fun, I did measure the energy consumption of a Z80 (in a ColecoVision) with reasonably high time resolution (current probe on oscilloscope). From the trace of the energy consumption, I could see which instructions were executed.
[toc] | [prev] | [next] | [standalone]
| From | David Brown <david.brown@hesbynett.no> |
|---|---|
| Date | 2021-11-24 13:58 +0100 |
| Message-ID | <snlctj$dch$1@dont-email.me> |
| In reply to | #82444 |
On 24/11/2021 12:01, Philipp Klaus Krause wrote: > Am 24.11.21 um 11:54 schrieb Juha Nieminen: >> >> So it's not a question of "how many % of the CPU can I use with this >> programming language", but "how long do I need to use the CPU in >> order to perform this task". >> > > On the other hand, the energy consumption of that CPU during that time > also depends on what it is doing (and to some degree an what data it is > processing). People have been doing side-channel attacks on cryptography > by very accurately measuring the energy consumption of the computers > doing the encrypting or decrypting. > > Long ago, for fun, I did measure the energy consumption of a Z80 (in a > ColecoVision) with reasonably high time resolution (current probe on > oscilloscope). From the trace of the energy consumption, I could see > which instructions were executed. > I used to debug my assembly code on my ZX Spectrum (with a Z80 cpu) by the sound of the power supply. However, with modern cpus there is so much going on that you are unlikely to get much detail by tracking power consumption. You could perhaps distinguish when blocks such as SIMD or the FPU are active, but otherwise there are so many instructions in flight at a time that you could not identify them. Differential power analysis for cryptoanalysis is almost entirely a thing of the past. (It could be practical for simpler processors and dedicated cryptography devices, except that designers of these things are usually aware of such attacks and they are easily blocked.)
[toc] | [prev] | [next] | [standalone]
| From | "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> |
|---|---|
| Date | 2021-11-23 13:23 -0800 |
| Message-ID | <snjm59$lg1$1@dont-email.me> |
| In reply to | #82398 |
On 11/22/2021 11:10 PM, Juha Nieminen wrote: > In comp.lang.c++ Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote: >> Interesting. However, I can write something in C that uses all CPU's >> 100%. > > I don't think that's the point. > Side note: Humm... Perhaps we can say that lock-free is "greener" than using locks. Say a computation using a nice lock-free algo takes 5 minutes. Vs, something using locks that takes 30 minutes to get the same result. I remember back in the day where I had to terminate the lock-based tests because they took way too long.
[toc] | [prev] | [next] | [standalone]
| From | Richard Damon <Richard@Damon-Family.org> |
|---|---|
| Date | 2021-11-22 18:25 -0500 |
| Message-ID | <hGVmJ.45875$Gco3.43326@fx01.iad> |
| In reply to | #82395 |
On 11/22/21 5:19 PM, Lynn McGuire wrote: > "C Is The Greenest Programming Language" by: Chris Lott > https://hackaday.com/2021/11/18/c-is-the-greenest-programming-language/ > > "Have you ever wondered if there is a correlation between a computer’s > energy consumption and the choice of programming languages? Well, a > group Portuguese university researchers did and set out to quantify it. > Their 2017 research paper entitled Energy Efficiency across Programming > Languages / How Do Energy, Time, and Memory Relate? may have escaped > your attention, as it did ours." > https://greenlab.di.uminho.pt/wp-content/uploads/2017/10/sleFinal.pdf > > "Abstract: This paper presents a study of the runtime, memory usage and > energy consumption of twenty seven well-known soft- ware languages. We > monitor the performance of such lan- guages using ten different > programming problems, expressed in each of the languages. Our results > show interesting find- ings, such as, slower/faster languages consuming > less/more energy, and how memory usage influences energy consump- tion. > We show how to use our results to provide software engineers support to > decide which language to use when energy efficiency is a concern." > > Lynn Well since one of the goals of the C Language was to enable programmers to write fast code, it can makes sense for C to be 'Green', at least by some measures. Fast code will be more energy efficient as processors basically use power based on the number of instructions executed (and memory accessed). What also needs to be considered is the time/energy needed to initially WRITE the code and get it working, and then factor in how many times the program will be used compared to the effort to write it.
[toc] | [prev] | [next] | [standalone]
| From | Juha Nieminen <nospam@thanks.invalid> |
|---|---|
| Date | 2021-11-23 07:21 +0000 |
| Message-ID | <sni4pq$1v37$1@gioia.aioe.org> |
| In reply to | #82397 |
In comp.lang.c++ Richard Damon <Richard@damon-family.org> wrote:
> Well since one of the goals of the C Language was to enable programmers
> to write fast code, it can makes sense for C to be 'Green', at least by
> some measures.
>
> Fast code will be more energy efficient as processors basically use
> power based on the number of instructions executed (and memory accessed).
I think that for as long as programmable computers have existed, there has
been a direct correlation between the "levelness" ("higher-level" vs.
"low-level") of a language and disregard towards how much resources the
language uses. As computers have become faster and faster, and the amount
of resources (primarily RAM) has increased, this indifference towards
resource consumption in higher-level languages has only likewise
increased.
The farther away the design of the language has been from the details of
the underlying hardware, the more the question of "how efficient is
the language, and how much RAM does it consume?" has been (implicitly
or explicitly) answered with, essentially, "it doesn't matter" and
"who cares?"
Take pretty much any scripting language, or any other interpreted
language (like the original BASIC and most of its subsequent variants).
Pretty much nobody cared how fast they are, or how much RAM they
consume. When someone is, let's say, implementing something in PHP
they seldom stop to think how much memory it consumes or how fast it is.
When someone is implementing something in shell script, one most
definitely does not think about speed or memory consumption.
Most object-oriented languages don't really care about, especially,
memory consumption. Especially garbage-collected OO languages don't
give a flying F about memory consumption. So what if an object needs
something like 16 or 32 bytes of bookeeping data? Who cares? That's
nothing! Trivial and inconsequential! Modern computers have gigabytes
of RAM! Why should you care if an object takes 32 bytes in addition
to whatever is inside it? What a silly notion!
Ironically, the programming world has in the last couple of decades awakened
to the harsh realization that this complete disregard of memory usage
actually causes inefficiencies in modern CPU architectures (because
cache misses are very expensive).
Oh well. As long as it works, who cares? Buy a faster computer.
[toc] | [prev] | [next] | [standalone]
| From | Guillaume <message@bottle.org> |
|---|---|
| Date | 2021-11-23 17:56 +0100 |
| Message-ID | <snj6h2$kf3$1@gioia.aioe.org> |
| In reply to | #82399 |
Le 23/11/2021 à 08:21, Juha Nieminen a écrit : > Oh well. As long as it works, who cares? Buy a faster computer. This sentence shows that you quite obviously got what "green" means.
[toc] | [prev] | [next] | [standalone]
| From | Juha Nieminen <nospam@thanks.invalid> |
|---|---|
| Date | 2021-11-24 10:55 +0000 |
| Message-ID | <snl5m3$1ges$2@gioia.aioe.org> |
| In reply to | #82411 |
In comp.lang.c++ Guillaume <message@bottle.org> wrote: > Le 23/11/2021 à 08:21, Juha Nieminen a écrit : >> Oh well. As long as it works, who cares? Buy a faster computer. > > This sentence shows that you quite obviously got what "green" means. I have no idea what you are talking about. Maybe you missed the fact that that sentence you quoted is sarcastic?
[toc] | [prev] | [next] | [standalone]
| From | Öö Tiib <ootiib@hot.ee> |
|---|---|
| Date | 2021-11-24 05:54 -0800 |
| Message-ID | <a334c262-efae-49d1-bfa5-d783476e3419n@googlegroups.com> |
| In reply to | #82442 |
On Wednesday, 24 November 2021 at 12:55:19 UTC+2, Juha Nieminen wrote: > In comp.lang.c++ Guillaume <mes...@bottle.org> wrote: > > Le 23/11/2021 à 08:21, Juha Nieminen a écrit : > >> Oh well. As long as it works, who cares? Buy a faster computer. > > > > This sentence shows that you quite obviously got what "green" means. > > I have no idea what you are talking about. > > Maybe you missed the fact that that sentence you quoted is sarcastic? He didn't, he just wanted to troll, not worth to reply.
[toc] | [prev] | [next] | [standalone]
| From | Lynn McGuire <lynnmcguire5@gmail.com> |
|---|---|
| Date | 2021-11-23 19:00 -0600 |
| Message-ID | <snk2qp$2hc$1@dont-email.me> |
| In reply to | #82399 |
On 11/23/2021 1:21 AM, Juha Nieminen wrote:
> In comp.lang.c++ Richard Damon <Richard@damon-family.org> wrote:
>> Well since one of the goals of the C Language was to enable programmers
>> to write fast code, it can makes sense for C to be 'Green', at least by
>> some measures.
>>
>> Fast code will be more energy efficient as processors basically use
>> power based on the number of instructions executed (and memory accessed).
>
> I think that for as long as programmable computers have existed, there has
> been a direct correlation between the "levelness" ("higher-level" vs.
> "low-level") of a language and disregard towards how much resources the
> language uses. As computers have become faster and faster, and the amount
> of resources (primarily RAM) has increased, this indifference towards
> resource consumption in higher-level languages has only likewise
> increased.
>
> The farther away the design of the language has been from the details of
> the underlying hardware, the more the question of "how efficient is
> the language, and how much RAM does it consume?" has been (implicitly
> or explicitly) answered with, essentially, "it doesn't matter" and
> "who cares?"
>
> Take pretty much any scripting language, or any other interpreted
> language (like the original BASIC and most of its subsequent variants).
> Pretty much nobody cared how fast they are, or how much RAM they
> consume. When someone is, let's say, implementing something in PHP
> they seldom stop to think how much memory it consumes or how fast it is.
> When someone is implementing something in shell script, one most
> definitely does not think about speed or memory consumption.
>
> Most object-oriented languages don't really care about, especially,
> memory consumption. Especially garbage-collected OO languages don't
> give a flying F about memory consumption. So what if an object needs
> something like 16 or 32 bytes of bookeeping data? Who cares? That's
> nothing! Trivial and inconsequential! Modern computers have gigabytes
> of RAM! Why should you care if an object takes 32 bytes in addition
> to whatever is inside it? What a silly notion!
>
> Ironically, the programming world has in the last couple of decades awakened
> to the harsh realization that this complete disregard of memory usage
> actually causes inefficiencies in modern CPU architectures (because
> cache misses are very expensive).
>
> Oh well. As long as it works, who cares? Buy a faster computer.
Not in California.
https://nichegamer.com/high-end-gaming-pcs-banned-in-six-us-states-after-california-energy-bill-limits-sales-on-high-performance-pcs/
Lynn
[toc] | [prev] | [next] | [standalone]
| From | scott@slp53.sl.home (Scott Lurndal) |
|---|---|
| Date | 2021-11-24 16:04 +0000 |
| Message-ID | <2otnJ.21405$b%.15512@fx24.iad> |
| In reply to | #82431 |
Lynn McGuire <lynnmcguire5@gmail.com> writes: >On 11/23/2021 1:21 AM, Juha Nieminen wrote: >> In comp.lang.c++ Richard Damon <Richard@damon-family.org> wrote: >> Ironically, the programming world has in the last couple of decades awakened >> to the harsh realization that this complete disregard of memory usage >> actually causes inefficiencies in modern CPU architectures (because >> cache misses are very expensive). >> >> Oh well. As long as it works, who cares? Buy a faster computer. > >Not in California. And Hawaii, Colorado, Oregon, Vermont and Washington State. Why did you single out California? And one can certainly purchase the most powerful computers in all of those states by assembling them personally - note also that servers aren't covered by the regulation, only desktop systems. Did you actually read the article you posted a link to? Here's an article without the panic, and with actual, you know, facts. https://www.makeuseof.com/why-the-california-ban-on-power-hogging-pcs-is-a-good-thing/
[toc] | [prev] | [next] | [standalone]
| From | Tim Rentsch <tr.17687@z991.linuxsc.com> |
|---|---|
| Date | 2021-12-16 07:55 -0800 |
| Message-ID | <861r2c4k8w.fsf@linuxsc.com> |
| In reply to | #82399 |
Juha Nieminen <nospam@thanks.invalid> writes: > [...] Most object-oriented languages don't really care about, > especially, memory consumption. Especially garbage-collected OO > languages don't give a flying F about memory consumption. [...] A humorous statement, considering that there were OOP systems, including garbage collection, running years before even the predecessor to C++, "C with Classes", existed. And these systems ran on hardware platforms that don't have enough memory to run probably any C++ compiler of the last 20+ years. Note by the way that using garbage collection very likely reduced the overall memory footprint, because all the places where there would have been code to free memory no code is needed, replaced by a single piece of code in the memory manager.
[toc] | [prev] | [next] | [standalone]
| From | legalize+jeeves@mail.xmission.com (Richard) |
|---|---|
| Date | 2021-12-16 16:24 +0000 |
| Message-ID | <spfp7l$1ugqq$1@news.xmission.com> |
| In reply to | #82660 |
[Please do not mail me a copy of your followup]
Tim Rentsch <tr.17687@z991.linuxsc.com> spake the secret code
<861r2c4k8w.fsf@linuxsc.com> thusly:
>A humorous statement, considering that there were OOP systems,
>including garbage collection, running years before even the
>predecessor to C++, "C with Classes", existed.
Are you thinking of Smalltalk or LISP?
>Note by the way that using garbage collection very likely reduced
>the overall memory footprint, because all the places where there
>would have been code to free memory no code is needed, replaced
>by a single piece of code in the memory manager.
An interesting hypothesis, but I'm not convinced without data.
--
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
The Terminals Wiki <http://terminals-wiki.org>
The Computer Graphics Museum <http://computergraphicsmuseum.org>
Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>
[toc] | [prev] | [next] | [standalone]
| From | Tim Rentsch <tr.17687@z991.linuxsc.com> |
|---|---|
| Date | 2021-12-16 19:46 -0800 |
| Message-ID | <86sfur3nct.fsf@linuxsc.com> |
| In reply to | #82661 |
legalize+jeeves@mail.xmission.com (Richard) writes: > Tim Rentsch <tr.17687@z991.linuxsc.com> spake the secret code > <861r2c4k8w.fsf@linuxsc.com> thusly: > >> A humorous statement, considering that there were OOP systems, >> including garbage collection, running years before even the >> predecessor to C++, "C with Classes", existed. > > Are you thinking of Smalltalk or LISP? Smalltalk. >> Note by the way that using garbage collection very likely reduced >> the overall memory footprint, because all the places where there >> would have been code to free memory no code is needed, replaced >> by a single piece of code in the memory manager. > > An interesting hypothesis, but I'm not convinced without data. Probably it depends on what applications are being programmed, given that Smalltalk is an interactive programming and development system. But surely it becomes true at some point as more code is written, since the amount of non-automatic memory management code would grow as additional applications are written, but code (and so the amount of code) in the garbage collector stays fixed regardless of how much application code is added.
[toc] | [prev] | [next] | [standalone]
| From | Juha Nieminen <nospam@thanks.invalid> |
|---|---|
| Date | 2021-12-17 06:30 +0000 |
| Message-ID | <sphapd$nms$1@gioia.aioe.org> |
| In reply to | #82660 |
Tim Rentsch <tr.17687@z991.linuxsc.com> wrote: > A humorous statement, considering that there were OOP systems, > including garbage collection, running years before even the > predecessor to C++, "C with Classes", existed. And these systems > ran on hardware platforms that don't have enough memory to run > probably any C++ compiler of the last 20+ years. > > Note by the way that using garbage collection very likely reduced > the overall memory footprint, because all the places where there > would have been code to free memory no code is needed, replaced > by a single piece of code in the memory manager. What systems had so little memory that they couldn't even run a C++ compiler, yet had an operating system that offered a memory manager with GC? And, ostensibly, was a multitasking OS (given that you are arguing the programs had an overall smaller memory footprint).
[toc] | [prev] | [next] | [standalone]
| From | Tim Rentsch <tr.17687@z991.linuxsc.com> |
|---|---|
| Date | 2021-12-18 07:45 -0800 |
| Message-ID | <86v8zl29yr.fsf@linuxsc.com> |
| In reply to | #82675 |
Juha Nieminen <nospam@thanks.invalid> writes: > Tim Rentsch <tr.17687@z991.linuxsc.com> wrote: > >> A humorous statement, considering that there were OOP systems, >> including garbage collection, running years before even the >> predecessor to C++, "C with Classes", existed. And these systems >> ran on hardware platforms that don't have enough memory to run >> probably any C++ compiler of the last 20+ years. >> >> Note by the way that using garbage collection very likely reduced >> the overall memory footprint, because all the places where there >> would have been code to free memory no code is needed, replaced >> by a single piece of code in the memory manager. > > What systems had so little memory that they couldn't even run a C++ > compiler, yet had an operating system that offered a memory manager > with GC? And, ostensibly, was a multitasking OS (given that you are > arguing the programs had an overall smaller memory footprint). There was no operating system in the conventional sense of the term. Garbage collection was part of the VM underlying the OOP environment. Multitasking was done in and by the OOP environment itself, with "stack frames" being objects, and so could be queued for later resumption, switched between, etc.
[toc] | [prev] | [next] | [standalone]
Page 1 of 5 [1] 2 3 4 5 Next page →
Back to top | Article view | comp.lang.c++
csiph-web