• Rasmus Hartvig
  • Jonas Krogh Hansen
4. term, Software, Master (Master Programme)
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.
Publication date9 Jun 2022
Number of pages91
ID: 472494697