Investigating the effect of design patterns on energy consumption

被引:19
|
作者
Feitosa, Daniel [1 ]
Alders, Rutger [1 ]
Ampatzoglou, Apostolos [1 ]
Avgeriou, Paris [1 ]
Nakagawa, Elisa Yumi [2 ]
机构
[1] Univ Groningen, Dept Math & Comp Sci, Groningen, Netherlands
[2] Univ Sao Paulo, Dept Comp Syst, Sao Paulo, Brazil
关键词
design patterns; energy efficiency; GoF patterns; state pattern; strategy pattern; template method pattern;
D O I
10.1002/smr.1851
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Gang of Four (GoF) patterns are well-known best practices for the design of object-oriented systems. In this paper, we aim at empirically assessing their relationship to energy consumption, ie, a performance indicator that has recently attracted the attention of both researchers and practitioners. To achieve this goal, we investigate pattern-participating methods (ie, those that play a role within the pattern) and compare their energy consumption to the consumption of functionally equivalent alternative (nonpattern) solutions. We obtained the alternative solution by refactoring the pattern instances using well-known transformations (eg, replace polymorphism with conditional statements). The comparison is performed on 169 methods of 2 GoF patterns (namely, State/Strategy and Template Method), retrieved from 2 well-known open source projects. The results suggest that for the majority of cases the alternative design excels in terms of energy consumption. However, in some cases (eg, when the method is large in size or invokes many methods) the pattern solution presents similar or lower energy consumption. The outcome of our study can be useful to both researchers and practitioners, because we: (1) provide evidence on a possible negative effect of GoF patterns, and (2) can provide guidance on which cases the use of the pattern is not hurting energy consumption.
引用
收藏
页数:20
相关论文
共 50 条
  • [1] Energy Consumption Analysis of Design Patterns
    Litke, Andreas
    Zotos, Kostas
    Chatzigeorgiou, Alexander
    Stephanides, George
    PROCEEDINGS OF WORLD ACADEMY OF SCIENCE, ENGINEERING AND TECHNOLOGY, VOL 6, 2005, : 227 - 231
  • [2] Optimising Energy Consumption of Design Patterns
    Noureddine, Adel
    Rajan, Ajitha
    2015 IEEE/ACM 37TH IEEE INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, VOL 2, 2015, : 623 - 626
  • [3] Comprehensive Multidisciplinary Electric Vehicle Modeling: Investigating the Effect of Vehicle Design on Energy Consumption and Efficiency
    Aslan, Eyyup
    Yasa, Yusuf
    Meseci, Yunus
    Arabul, Fatma Keskin
    Arabul, Ahmet Yigit
    SUSTAINABILITY, 2024, 16 (12)
  • [4] Investigating the factors shaping residential energy consumption patterns in France: evidence form quantile regression
    Belaid, Fateh
    Ben Youssef, Adel
    Omrani, Nessrine
    EUROPEAN JOURNAL OF COMPARATIVE ECONOMICS, 2020, 17 (01): : 127 - 151
  • [5] Investigating the effect of varying block size on power and energy consumption of GPU kernels
    Muhammad Jawad Ikram
    Mostafa Elsayed Saleh
    Muhammad Abdulhamid Al-Hashimi
    Osama Ahmed Abulnaja
    The Journal of Supercomputing, 2022, 78 : 14919 - 14939
  • [6] Investigating the effect of varying block size on power and energy consumption of GPU kernels
    Ikram, Muhammad Jawad
    Saleh, Mostafa Elsayed
    Al-Hashimi, Muhammad Abdulhamid
    Abulnaja, Osama Ahmed
    JOURNAL OF SUPERCOMPUTING, 2022, 78 (13): : 14919 - 14939
  • [7] A Comprehensive Study on the Effect of Households' Evolution on Residential Energy Consumption Patterns
    Chalal, Moulay Larbi
    Benachir, Medjdoub
    White, Michael
    Shahtahmassebi, Golnaz
    Shrahily, Raid
    PROCEEDINGS OF 3RD INTERNATIONAL SUSTAINABLE BUILDINGS SYMPOSIUM (ISBS 2017), VOL 1, 2018, 6 : 485 - 500
  • [8] Investigating the effect of control strategy on the shift of energy consumption in a building integrated with PCM wallboard
    Bostani, Arash
    Haghighat, Fariborz
    Jalon Manzano, Celia
    6TH INTERNATIONAL BUILDING PHYSICS CONFERENCE (IBPC 2015), 2015, 78 : 2280 - 2285
  • [9] Approaches to sustainable energy consumption patterns
    Krajnc, Damjan
    Lukman, Rebeka
    Glavic, Peter
    SUSTAINABLE ENERGY PRODUCTION AND CONSUMPTION: BENEFITS, STRATEGIES AND ENVIRONMENTAL COSTING, 2008, : 213 - 226
  • [10] PATTERNS OF US ENERGY CONSUMPTION TO 1980
    VOGELY, WA
    MORRISON, WE
    IEEE SPECTRUM, 1967, 4 (09) : 81 - &