An Energy Aware Linter: Helping programmers make more energy efficient code on the fly
Studenteropgave: Kandidatspeciale og HD afgangsprojekt
- Rasmus Hartvig
- Jonas Krogh Hansen
4. semester, Software, Kandidat (Kandidatuddannelse)
Energy consumption of software has
become a prominent focus area for re-
searchers and developers. Much work
has gone into researching patterns and
constructions that consume more en-
ergy than others, across programming
languages and platforms. Code smells
have been examined to a large extent,
however not much research has gone
into examining if the results carry over
to other languages or platforms. In ad-
dition to this, not many tools for de-
tecting these issues exist. This report
examines a collection of code smells
that have been proven to have an im-
pact in Java on desktop systems and
C++ on embedded systems to see if
they have the same impact in C# on a
desktop system, in both a micro- and
macrobenchmarks. Initial tests show
that removing a number of code smells
from a macro system can save up to
23% in energy consumption. To ease
the process of such refactoring, an ef-
fort is made to create a linter-like tool
that can detect such patterns using the
analysis engine CodeQL.
become a prominent focus area for re-
searchers and developers. Much work
has gone into researching patterns and
constructions that consume more en-
ergy than others, across programming
languages and platforms. Code smells
have been examined to a large extent,
however not much research has gone
into examining if the results carry over
to other languages or platforms. In ad-
dition to this, not many tools for de-
tecting these issues exist. This report
examines a collection of code smells
that have been proven to have an im-
pact in Java on desktop systems and
C++ on embedded systems to see if
they have the same impact in C# on a
desktop system, in both a micro- and
macrobenchmarks. Initial tests show
that removing a number of code smells
from a macro system can save up to
23% in energy consumption. To ease
the process of such refactoring, an ef-
fort is made to create a linter-like tool
that can detect such patterns using the
analysis engine CodeQL.
Sprog | Engelsk |
---|---|
Udgivelsesdato | 9 jun. 2022 |
Antal sider | 91 |
Emneord | Energy, Linter, Energy Awereness, Power, Strøm |
---|