Stories
Slash Boxes
Comments

SoylentNews is people

SoylentNews is powered by your submissions, so send in your scoop. Only 19 submissions in the queue.
posted by janrinok on Saturday November 20 2021, @10:03PM   Printer-friendly
from the is-it-cost-effective dept.

This paper is from 2017, however, I found it interesting and thought our community would also find this worthy of discussion ...

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.

The team used a collection of ten standard algorithms from the Computer Language Benchmarks Game project (formerly known as The Great Computer Language Shootout) as the basis for their evaluations.

Last year they updated the functional language results, and all the setups, benchmarks, and collected data can be found here. Check out the paper for more details. Have your choice of programming language ever been influenced by energy consumption?

hackaday.com


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 3, Informative) by Anonymous Coward on Sunday November 21 2021, @01:34PM (5 children)

    by Anonymous Coward on Sunday November 21 2021, @01:34PM (#1198315)

    Was good to see Pascal (safer & FASTER than C++) do so well in that article. Especially in "good company" (even thought it's BETTER than the others & "seasoned/proven" for DECADES since, oh, 1970 or so). It did great in memory use, & scored in "TOP MARKS" in the Pareto Optimal category overall for energy use in combination with memory usage. Only reason C did better is what I go into later (on string processing it omits that MAKES IT UNSAFE vs. buffer overflows) from the source article's analysis https://greenlab.di.uminho.pt/wp-content/uploads/2017/10/sleFinal.pdf [uminho.pt]

    PERFORMANCE WISE vs. C++, VB, & Java? No contest.

    C++ may overcome string buffer overflow security issues in C string (slowing it there too, ~2x slower vs. Pascal @ LEAST, due to having to perform string length checks (1 pointer always double the other in a string character array, & when the larger fails you have midpoint, double it you have string length, or a strlen function, or just searching the C string for NULL CHAR terminator (the safety issue))) but it FAILS on speed!

    PROOFS (on math speed ~2x that of C++ too, not just ~2x string processing speed superiority):

    3/6 tests given in a competing trade journal, Delph won 1st (2x second place & last only 1x, but oddly to VB - NOT C++).

    Back circa 1997, I was a BIG fan of coding with Visual Studio... especially MSVC++ &/or VB.

    I run into a review in VBPJ, of all places (Visual Basic Programmer's Journal) Sept./Oct. 1997 issue "Inside the VB Compiler", a competing trade rag no less & one that was QUITE respected!

    There, I saw Borland Delphi LITERALLY "knock-the-chocolate" outta MS' offerings, overall, in performance.

    How much so? Ok (& this IS what I took to mgt.):

    In the 6 tests given, Delphi won the majority (overwhelmingly in fact, in what ALL PROGRAMS DO, math & strings work).

    Specifics below (the most important, overall? Again - imo @ least - What they ALL do - math & strings!):

    Delphi took me from C/C++ & VB (my "then favorites") - nothing touched Delphi to get C++ (heck, better, proof's below) power & speed + abilities (except for multiple inheritance model) & to build it as fast/easy as VB too?? You couldn't TOUCH that combination!

    A test resultset from (from a competing language's "trade rag", of all places) "VBPJ" (Visual Basic Programmer's Journal) issue Sept./Oct. 1997 "Inside the VB5 Compiler" saw Borland Delphi LITERALLY "knock-the-chocolate" outta MS' offerings, overall, in performance... & you KNOW that a competing language's magazine is NOT going to "play up" the competition. Results did so though. They only noted these facts in 1 line of that article in a SOMEWHAT honest appraisal (but the numbers said it all).

    STRING SUITE:

    Delphi = .275ms
    MSVC++ = .500ms
    MSVB = 4.091ms

    ---

    MATH SUITE:

    Delphi = 1.523ms
    MSVC++ = 2.890ms
    MSVB = 7.071ms

    ---

    API GRAPHICS METHODS SUITE:

    Delphi = .269ms
    MSVC++ = .293ms
    MSVB = 292

    ---

    TEXTBOX FORM LOADING SUITE:

    MSVC++ = .012ms
    Delphi = .069ms
    MSVB = .072ms

    ---

    ACTIVE X FORM LOADS:

    MSVB = .114ms
    Delphi = .495ms
    MSVC++ = .778ms

    ---

    NATIVE TO LANGUAGE GRAPHICS METHODS SUITE:

    MSVC++ = .293ms
    MSVB = .455ms
    Delphi = .503ms

    ---

    In the 6 tests given, Delphi won the majority (overwhelmingly in fact, in what ALL PROGRAMS DO, math & strings work + graphics strong showing #1, & only 1 "outright loss" (2 second places)).

    I've seen PRETTY MUCH THE SAME CONSISTENTLY in other tests since then online as well!

    * "Argue with the numbers..."

    There you are. However: KNOW WHAT I WAS TOLD, that I absolutely HAD TO LISTEN TO & UNDERSTAND (which, I did):

    ---

    "Microsoft has BILLIONS of dollars & absolute stability. We want to have SOMEONE to take responsibility for errors in their stuff, and to have support in the future. Microsoft odds are WILL BE THERE STILL. Will Borland?"

    That was DECADES AGO - circa 1997 - Delphi's still around but NOW multiplatform (& from 16 bit to 64 bit).

    ---

    I use FreePascal more now, just as fast & multi-platform capable across tons of Operating Systems (especially in MATH & STRINGS which every program does basically in some way, shape, or form) & it rocks on Linux, Windows, BSD variants & MacOS!

    THAT IS BUSINESS' POV in a nutshell... & Borland was getting "brain-drained" (especially for the designers of Delphi) by MS regularly... ever heard of Mr. Anders Heijelsberg &/or Chuck Andrzewski? They built Delphi & MS got 'em!

    (Those 2 former Borland guys now @ Microsoft designed .NET & all its dialects - OFTEN taking things Borland Delphi already had, in data containers for example that is decent!)

    * Anyhow/anyways: That WHY Pascal variants are my ALL-TIME favorite (no string bufferoverflow like C can have for security due to no inbuilt length & reference counters like Pascal Strings have ALWAYS had - faster than C even too, not just safer)

    & I program fluently in over 12 languages (& like most experienced coders with decades under their belts (since 1982 here), picking up new ones isn't tough - it's all the same if you know what questions to ask & say "I know how it's done in (insert language here) so see documentation for that concept in (insert other new language here)").

    Alexander Peter Kowalski

    Yes - Again, FreePascal & it's Lazarus IDE is my current "weapon of choice" by default for ALL the reasons & data above. It rocks - & I used it to create Hosts Engine for all the reason above (safety in strings which this does EXTENSIVELY, & for speed as well on the SAME NOTE (string processing speed excellence)). Right tool for the job, unquestionably. The program also gives you more SAFETY & SPEED online (figures, the language I used does that too). Apple doesn't fall too far from the tree, so-to-speak! It runs on Windows, Linux, BSD variants (& even MacOS up to present Monterey, but no point there - Apple CRIPPLED the hosts file there).

    There's a reason it's in the TIOBE index top 20 languages & only ONCE I know of it wasn't never missed being in it since 2001 - 20++ years GOING STRONG!

    This all lets me know I made the RIGHT CHOICE on many grounds, but based on data/facts to DEFEND my stance here.

    FreePascal/Lazarus IDE (almost EXACT clone of Delphi) is 100% free, no strings attached (those that are in strings they work on? FASTEST + SAFEST possible & all programs do work in strings)!

    & Malwarebytes? EXCELLENT COMPANY for me to have kept, just like Pascal for me & using hosts files for you - The BEST in the security antimalware & antispyware business currently per a very recent test of antivirus/antispyware/antimalware efficacy http://www.av-test.org/en/news/news-single-view/17-software-packages-in-a-repair-performance-test-after-malware-attacks/ [av-test.org] per that VERY recent test's results, also hosted & RECOMMENDED my program for hosts over @ Malwarebytes' folks servers for YEARS circa 2012-2020.

    Starting Score:    0  points
    Moderation   +3  
       Interesting=1, Informative=2, Total=3
    Extra 'Informative' Modifier   0  

    Total Score:   3  
  • (Score: -1, Flamebait) by Anonymous Coward on Sunday November 21 2021, @04:29PM (4 children)

    by Anonymous Coward on Sunday November 21 2021, @04:29PM (#1198348)

    Apk you're still rockin' trolls' worlds shootin' 'em down in flames on all counts here https://soylentnews.org/comments.pl?noupdate=1&sid=46096&page=1&cid=1198331#commentwrap [soylentnews.org] so I dedicated a themesong to your troll fanclub in honor of it from AC/DC https://www.youtube.com/watch?v=UKwVvSleM6w [youtube.com] Shotdown in Flames, a classic that fits the bill there. Ya got 'em. Both barrells.

    • (Score: -1, Offtopic) by Anonymous Coward on Monday November 22 2021, @12:13AM (3 children)

      by Anonymous Coward on Monday November 22 2021, @12:13AM (#1198460)

      See my subject-line above & thanks for upmods too folks + Gotta do it in honor of that tune (love it still) "ANGUS, shoot me - SHOOT ME!" from the LATE GREAT Bonn Scott (best singer they ever had in AC/DC, hands-down).

      * BOTH Barrels (it's single L @ the end of that character string - lol, nitpicking (I hate it too, grammar/spelling Nazis & all that))

      APK

      P.S.=> He started "down modding" on the VERY THING that pisses that weak troll off https://soylentnews.org/comments.pl?noupdate=1&sid=46096&page=1&cid=1198450#commentwrap [soylentnews.org] where I confront him on his errors AND challenge him to PROVE he's done MORE, BETTER, & EARLIER than I have & WEAK in "intestinal fortitude" & BRAINS fools like him NEVER can or HAVE, ever (from only a VERY SMALL PARTIAL LIST I could put out in ENTIRETY, but my early wins are the best ones to me) in its original form SO I REPOSTED IT (no limits here on posts I can do, ala the Bradley Cooper movie LIMITLESS)! That troll, who stalks me by AC or sockpuppets galore e.g. named dalek here, just to gain modpoints to upmod himself under MANY fakename identities "his LOW kind" HAVE to do (do-nothing whimps that are JEALOUS of those who are not defective like them, lol) - they are PITIFUL but in the end, again thank-you for the upmods AND for the tune to CELEBRATE UTTERLY CRUSHING A PUNY TROLL, lol... apk

      • (Score: 0) by Anonymous Coward on Monday November 22 2021, @07:43PM (2 children)

        by Anonymous Coward on Monday November 22 2021, @07:43PM (#1198645)

        P.S.=> He started "down modding" on the VERY THING that pisses that weak troll off https://soylentnews.org/comments.pl?noupdate=1&sid=46096&page=1&cid=1198450#commentwrap [soylentnews.org] [soylentnews.org] where I confront him on his errors AND challenge him to PROVE he's done MORE, BETTER, & EARLIER than I have & WEAK in "intestinal fortitude" & BRAINS fools like him NEVER can or HAVE

        so not only are you a sore loser, you're a sore winner too. nobody has even downvoted or smack talked you in this thread and yet you still feel the need to pull this out

        • (Score: 1, Funny) by Anonymous Coward on Tuesday November 23 2021, @01:11AM (1 child)

          by Anonymous Coward on Tuesday November 23 2021, @01:11AM (#1198772)

          I read that link you know. In your post parent to it you gave him crap with a pack of lies from you and he shot you down in flames for it. Quit playing victim. It's not working and proving You are a buttsore loser.

          • (Score: 0) by Anonymous Coward on Tuesday November 23 2021, @05:30AM

            by Anonymous Coward on Tuesday November 23 2021, @05:30AM (#1198814)

            nope, first time I've posted in this thread. not every AC post is from the same AC dude