{"id":9111,"date":"2021-11-24T13:29:44","date_gmt":"2021-11-24T13:29:44","guid":{"rendered":"http:\/\/TheNextWeb=1373976"},"modified":"2021-11-24T13:29:44","modified_gmt":"2021-11-24T13:29:44","slug":"python-sucks-in-terms-of-energy-efficiency-literally","status":"publish","type":"post","link":"https:\/\/www.londonchiropracter.com\/?p=9111","title":{"rendered":"Python sucks in terms of energy efficiency \u2014 literally"},"content":{"rendered":"\n<p>Python is one of the most popular programming languages in the world. Dutch software company\u2019s <a href=\"https:\/\/www.zdnet.com\/article\/programming-languages-python-just-took-a-big-jump-forward\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">programming language index<\/a> for 2021 also indicates that.<\/p>\n<p>But is it one of the most energy-efficient coding languages out there? Not really. <a href=\"https:\/\/greenlab.di.uminho.pt\/wp-content\/uploads\/2017\/10\/sleFinal.pdf\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">A study<\/a> from researchers of Universidade do Minho, Portugal (first spotted by <a href=\"https:\/\/hackaday.com\/2021\/11\/18\/c-is-the-greenest-programming-language\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">hackaday<\/a>) says that Python is just better than Perl in terms of energy consumed while performing certain tasks. It notes that C tops the chart followed by Rust, C++, and Ada.<\/p>\n<p>Researchers used 10 popular algorithms from <a href=\"https:\/\/benchmarksgame-team.pages.debian.net\/benchmarksgame\/index.html\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">the Computer Language Benchmarks Game (CLBG)<\/a>, to measure the energy consumption, runtime, and memory usage of 27 well-known coding languages. You can check out the results in the table below:<\/p>\n<figure class=\"post-image post-mediaBleed aligncenter\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-1373982 js-lazy\" src=\"https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-5.38.47-PM.png\" alt=\"Comparing energy consumption, time, and memory used by different programming languages\" width=\"352\" height=\"386\" sizes=\"(max-width: 352px) 100vw, 352px\" data-srcset=\"https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-5.38.47-PM.png 352w, https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-5.38.47-PM-192x210.png 192w, https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-5.38.47-PM-123x135.png 123w, https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-5.38.47-PM-246x270.png 246w\"><figcaption><a href=\"https:\/\/thenextweb.com\/news\/python-progamming-language-energy-analysis#\" data-url=\"https:\/\/twitter.com\/intent\/tweet?url=https%3A%2F%2Feditorial.thenextweb.com%2Fdd%2F2021%2F11%2F24%2Fpython-progamming-language-energy-analysis%2F&amp;via=thenextweb&amp;related=thenextweb&amp;text=Check out this picture on: Comparing energy consumption, time, and memory used by different programming languages\" data-title=\"Share Comparing energy consumption, time, and memory used by different programming languages on Twitter\" data-width=\"685\" data-height=\"500\" class=\"post-image-share popitup\" title=\"Share Comparing energy consumption, time, and memory used by different programming languages on Twitter\"><i class=\"icon icon--inline icon--twitter--dark\"><\/i><\/a>Comparing energy consumption, time, and memory used by different programming languages<\/figcaption><noscript><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-1373982\" src=\"https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-5.38.47-PM.png\" alt=\"Comparing energy consumption, time, and memory used by different programming languages\" width=\"352\" height=\"386\" srcset=\"https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-5.38.47-PM.png 352w, https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-5.38.47-PM-192x210.png 192w, https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-5.38.47-PM-123x135.png 123w, https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-5.38.47-PM-246x270.png 246w\"><\/noscript><\/figure>\n<p>It\u2019s pretty clear that Python performs poorly in terms of time and memory.<\/p>\n<p>Now you might argue that this study is from 2017, and a lot has changed since then, you\u2019re right. So the researchers have published another study with updated tests and results earlier this year. Spoiler alert: Python still performs poorly.<\/p>\n<p>In these extended tests, researchers established a co-relation between DRAM energy consumption, peak memory, and total memory used during the execution.<\/p>\n<p><figure class=\"post-image post-mediaBleed aligncenter\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-1373984 size-featured_img js-lazy\" src=\"https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-5.56.04-PM-e1637756951201-796x752.png\" alt width=\"796\" height=\"752\" sizes=\"(max-width: 796px) 100vw, 796px\" data-srcset=\"https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-5.56.04-PM-e1637756951201-796x752.png 796w, https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-5.56.04-PM-e1637756951201-222x210.png 222w, https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-5.56.04-PM-e1637756951201-143x135.png 143w, https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-5.56.04-PM-e1637756951201-286x270.png 286w, https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-5.56.04-PM-e1637756951201.png 1093w\"><noscript><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-1373984 size-featured_img\" src=\"https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-5.56.04-PM-e1637756951201-796x752.png\" alt width=\"796\" height=\"752\" srcset=\"https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-5.56.04-PM-e1637756951201-796x752.png 796w, https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-5.56.04-PM-e1637756951201-222x210.png 222w, https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-5.56.04-PM-e1637756951201-143x135.png 143w, https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-5.56.04-PM-e1637756951201-286x270.png 286w, https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-5.56.04-PM-e1637756951201.png 1093w\"><\/noscript><\/figure>\n<\/p>\n<p>The team also performed a set of standard algorithms along with a few tests from <a href=\"https:\/\/www.rosettacode.org\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Rosetta Code<\/a>, a site to compare different programming languages\u2019 execution of common algorithms. You can check out the tables below; Python is mostly in the bottom half of rankings when it comes to energy consumption. It couldn\u2019t even complete the Fibonacci task in 24 hours of the cut-off time.<\/p>\n<p><figure class=\"post-image post-mediaBleed aligncenter\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-featured_img wp-image-1373985 js-lazy\" src=\"https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-6.01.01-PM-796x868.png\" alt width=\"796\" height=\"868\" sizes=\"(max-width: 796px) 100vw, 796px\" data-srcset=\"https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-6.01.01-PM-796x868.png 796w, https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-6.01.01-PM-192x210.png 192w, https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-6.01.01-PM-124x135.png 124w, https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-6.01.01-PM-247x270.png 247w, https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-6.01.01-PM.png 1318w\"><noscript><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-featured_img wp-image-1373985\" src=\"https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-6.01.01-PM-796x868.png\" alt width=\"796\" height=\"868\" srcset=\"https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-6.01.01-PM-796x868.png 796w, https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-6.01.01-PM-192x210.png 192w, https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-6.01.01-PM-124x135.png 124w, https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-6.01.01-PM-247x270.png 247w, https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-6.01.01-PM.png 1318w\"><\/noscript><\/figure>\n<figure class=\"post-image post-mediaBleed aligncenter\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-featured_img wp-image-1373986 js-lazy\" src=\"https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-6.01.16-PM-796x651.png\" alt width=\"796\" height=\"651\" sizes=\"(max-width: 796px) 100vw, 796px\" data-srcset=\"https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-6.01.16-PM-796x651.png 796w, https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-6.01.16-PM-257x210.png 257w, https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-6.01.16-PM-165x135.png 165w, https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-6.01.16-PM-330x270.png 330w, https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-6.01.16-PM.png 1348w\"><noscript><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-featured_img wp-image-1373986\" src=\"https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-6.01.16-PM-796x651.png\" alt width=\"796\" height=\"651\" srcset=\"https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-6.01.16-PM-796x651.png 796w, https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-6.01.16-PM-257x210.png 257w, https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-6.01.16-PM-165x135.png 165w, https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-6.01.16-PM-330x270.png 330w, https:\/\/cdn0.tnwcdn.com\/wp-content\/blogs.dir\/1\/files\/2021\/11\/Screenshot-2021-11-24-at-6.01.16-PM.png 1348w\"><\/noscript><\/figure>\n<\/p>\n<p>So it\u2019s evident that languages like Python, Perl, and Ruby are not really energy efficient. On the other hand, C, C++, and Rust are some of the greenest languages of the lot.<\/p>\n<p>You can read more about the study and the method used to evaluate this result <a href=\"https:\/\/haslab.github.io\/SAFER\/scp21.pdf\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">here<\/a>.<\/p>\n<p> <a href=\"https:\/\/thenextweb.com\/news\/python-progamming-language-energy-analysis\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Python is one of the most popular programming languages in the world. Dutch software company\u2019s programming language index for 2021 also indicates that. But is it one of the most energy-efficient coding&#8230;<\/p>\n","protected":false},"author":1,"featured_media":9112,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.londonchiropracter.com\/index.php?rest_route=\/wp\/v2\/posts\/9111"}],"collection":[{"href":"https:\/\/www.londonchiropracter.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.londonchiropracter.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.londonchiropracter.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.londonchiropracter.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9111"}],"version-history":[{"count":0,"href":"https:\/\/www.londonchiropracter.com\/index.php?rest_route=\/wp\/v2\/posts\/9111\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.londonchiropracter.com\/index.php?rest_route=\/wp\/v2\/media\/9112"}],"wp:attachment":[{"href":"https:\/\/www.londonchiropracter.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9111"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.londonchiropracter.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9111"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.londonchiropracter.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9111"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}