Comparative study of energy consumed by selected programming languages
This report will explore environmental factors focused on IT based resources, a set of experiments will be used to investigate the factors that have impact on the energy consumption within software and hardware usage. The experiments will cover the comparison of 3 separate programs all achieving the same functions and output. The languages used will be the top 3 used in 2018 with information provided by IEEE. For each statement used by each language a visual representation of its energy consumption will be documented and compared.
DECLARATION & CALCULATION
num = 4;
int number2 = 9;
Number x number;
Number / number2;
Number – Number2;
Number + Number2;
if (num < 700)
printf (“First Condition is true ”);
if (num > 300)
printf (“First and Second conditions are true ”);
switch (case Switch)
- To design a set of experiments that investigate the factors on energy consumption of software
- Critically compare the results of the experiments to determine which uses the most power
To grasp an understanding of why environmental issues regarding computing use are so important, the following list of research objectives will be looked at:
- Conduct literature review on climate change and computing’s effect on this
- Conduct experiments with the following programming languages to see which uses the most power
- Discuss the uses of each language and whether they are interchangeable
- Provide recommendations with evidence on how companies and organisations could use different languages to achieve the same outcome using less energy
The reason for conducting this study is to determine whether or not certain programming languages can create the same output at different energy usage levels. With the rise of computing and applications in the world, programming has no intention of stopping, this study will shed light onto the possibility of changing an organisations core chosen programming language to relive the effects of their carbon footprint.
Humans impact on the planet has had a decremental effect and this effect raises daily (figure 1). As a planet, the main occupiers have a finite amount of natural resources, continuing to think unlimited natural resources are available isn’t acceptable anymore; resources humanity have as a planet compared to the rate of consumption doesn’t equate to a happy ending (Creighton, 2014). A big effect on the usage of the worlds natural resources is computing, every year a consistent rise in technology appears as moors law predicts* the rise of this usage has a direct effect on the planet, giving the users of this technology a responsibility to improve the efficiency. Computing creates multiple benefits but consumes a lot of natural resources (Andy Hopper).
*Moore’s Law is the observation that the number of transistors on a chip doubles every year while the costs are halved. This translates to higher computing power over time (Investopedia, 2016).
The environment is always changing, this can be due to several natural & unnatural factors. The term carbon footprint has long been associated with environmental factors, the definition of this is not straight forward but the common baseline is that carbon footprint stands for a certain amount of gaseous emissions that are applicable with climate change and associated with human’s production/consumption activities (Pertsova, 2007). The dominant man-made greenhouse gas is currently carbon dioxide (CO2) emitted whenever humans burn fossil fuels. Other greenhouse gases play an important role, Methane, Nitrous oxide & refrigerant gases. These together are best described as Carbon Dioxide Equivalent (CO2E). To get an understanding of the relevance between a human’s actions and their carbon footprint, the measurement of actions needs to be assessed. A good example of this is a text message, an action most of the population is familiar with, uses around 0.014g CO2E per text message. Whilst this figure seems small, the effect of all text messages produces around 32,000 tonnes of CO2E yearly (Berners-Lee, 2010).
Our academic experts are ready and waiting to assist with any writing project you may have. From simple essay plans, through to full dissertations, you can guarantee we have a service perfectly matched to your needs.View our services
Greenhouse gasses effect on the planet vary, the most damaging effect is the change of temperature, greenhouse gases absorb heat that is reflected off the surface of the earth, this heat is then remitted to the earth. This process isn’t the damaging effect, without this the earth would be far too cold to live on, the problem occurs when fossil fuels are burnt causing other greenhouse gases to be released; this is known as the greenhouse effect (Carbon Footprint, 2018)
Within this paper a quantitive research process is followed using tools such as Visual studio and programming languages such as Python, C++ and C#. This type of research involves the use of computational results & mathematical tools to derive results; in this case, using the results of the chosen experiments to determine recommendations to organisations.
Visual studio is an integrated development environment (IDE) that offers tools and support for many different languages such as: C++, PHP, JSON, PYTHON and C# (Microsoft-Documentation , 2018). Visual studio was selected for this project due to its vast adoption within organisational settings, a study was recently done to see what percentage of workplaces used Visual studio, it was discovered that around 66,970 companies use the software, with around 17% of those companies being directly involved with computer software development (IDatalabs, 2017).
A program developed by Microsoft that offers computational energy measurement and optimization, it was selected for these experiments for its csv file type capturing. The file produced by the Joulemeter application allows easy data readings and calculations which is crucial for the time constraints of this report. Joulemeter estimates the usage of several components such as CPU, Screen, memory & total power use (Liu & Goraczko, 2010).
To ensure the study taking place is relevant, the languages chosen for this experiment were deliberately chosen from the top 10 used over 2018. IEEE produced a chart of the most 20 popular languages ranked against each other, Python, C++ and C# are within the top 5 (IEEE, 2018). With the aim of these experiments to shed light on which languages consume the most power and to see if any of these three languages are interchangeable.
Ranked number 1 by IEEE, this is a high-level language that uses dynamic typing / coupling to produce a fast & efficient language. Python is simple to learn and easy to use as the syntax is drastically easier to understand in comparison to typically used languages such as C and Java. The application domains for python are extensive; Web & Internet development, Scientific and numeric applications, Educational, Desktop GUI’s, Software development and Business applications (Python Software Foundation, 2018).
Placing 2nd in 2018’s top used programming languages is C#, a well-known language that’s used both in industry and educational settings, In the year 2018, GitHub published statistics based on the number of repositories used by each language, in an effort to determine the popularity of any given language. C++ has over 86,000 repositories as shown in figure 3 which is justifies why it was chosen for these experiments. Applications such as Adobe Photoshop, Amazon and Autodesk are all heavily reliant C++ (Programiz, 2017).
This programming language is targeted towards windows operating system and can be used for several application types: XML web services, Client-server applications, Database applications and windows client apps (Microsoft, 2015). Ranking below both python and C++ in IEEE’s top languages at 5th and trailing behind on GitHub repositories with only 56,062. Regardless of its ranking and status it’s still a well-used language that organistion still use.
Figure 3 – Highlighted: Python, C#, C++ (GitHub repository information, 2018)
To compare the given languages, 3 programs were created for each language. Each program was designed to test several frequently used factors of programming to see if a certain language would produce a higher power usage. The following were tested during this experiment:
**Examples of declaration and calculation programs are given in the Appendix
- Andy Hopper, A. R. (n.d.). Computing for the future of the planet . London: The Royal Academy of Engineering.
- Berners-Lee, M. (2010). How Bad Are Bananas?: The carbon footprint of everything. London: Profile Books LTD.
- Carbon Footprint. (2018). CLIMATE CHANGE . Retrieved from Carbon Footprint: https://www.carbonfootprint.com/warming.html
- Cook, G. (2017). CLICKING CLEAN: WHO IS WINNING THE RACE TO BUILD A GREEN INTERNET? Washington, D.C. : Greenpeace Inc.
- Creighton, J. (2014, July 24). A Timeline of Death: How Long Until We Exhaust All Our Resources? Retrieved from Futurism: https://futurism.com/how-long-do-we-have-until-we-exhaust-all-of-our-resources
- IDatalabs. (2017). Companies using Microsoft Visual Studio. Retrieved from IDatalabs: https://idatalabs.com/tech/products/microsoft-visual-studio
- IEEE. (2018, July 31). The 2018 Top Programming Languages. Retrieved from IEEE Spectrum: https://spectrum.ieee.org/at-work/innovation/the-2018-top-programming-languages
- Investopedia. (2016). Moore’s Law. Retrieved from Investopedia: https://www.investopedia.com/terms/m/mooreslaw.asp
- Liu, J., & Goraczko, M. (2010, February 23). Joulemeter. Retrieved from Microsoft: https://www.microsoft.com/en-us/research/project/joulemeter-computational-energy-measurement-and-optimization/
- Matuszek, D. (2009, October 26th). Control statements . Retrieved from Penn Engineering : https://www.cis.upenn.edu/~matuszek/General/JavaSyntax/control-statements.html
- Microsoft. (2015, July 20). Introduction to the City and Language and the .NET framework. Retrieved from Microsoft: https://docs.microsoft.com/en-us/dotnet/csharp/getting-started/introduction-to-the-csharp-language-and-the-net-framework
- Microsoft-Documentation . (2018, 12 12). Supported Programming languges .
- Pertsova, C. C. (2007). Ecological Economics Research Trends. New york: Nova science papers.
- Programiz. (2017). The Definitive Guide. Retrieved from Learn C++ Programming: httpus://programiz.com/cpp-programming
- Python Software Foundation. (2018). Applications for python. Retrieved from Python: https://www.python.org/about/apps/
**INSERT CSV FILE CONTENTS HERE**
**INSERT SOURCE CODE SNIPPETS CONTENTS HERE**
Cite This Work
To export a reference to this article please select a referencing stye below:
Related ServicesView all
DMCA / Removal Request
If you are the original writer of this essay and no longer wish to have your work published on UKEssays.com then please: