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 条
  • [31] Investigating the residential energy consumption behaviors in Beijing: a survey study
    Liu, Lan-Cui
    Wu, Gang
    Zhang, Yue-Jun
    NATURAL HAZARDS, 2015, 75 (01) : 243 - 263
  • [32] Investigating the influence of the Daylight Saving Time on the population and energy consumption
    Oliveira, N.
    Samagaio, A.
    Monteiro, A.
    EUROPEAN JOURNAL OF PUBLIC HEALTH, 2019, 29
  • [33] Investigating the residential energy consumption behaviors in Beijing: a survey study
    Lan-Cui Liu
    Gang Wu
    Yue-Jun Zhang
    Natural Hazards, 2015, 75 : 243 - 263
  • [34] INVESTIGATING THE DETERMINANTS OF RENEWABLE ENERGY CONSUMPTION IN MALAYSIA: AN ARDL APPROACH
    Lau, Lin-Sea
    Yii, Kwang-Jing
    Lee, Chin-Yu
    Chong, Yee-Lee
    Lee, Eng-Heng
    INTERNATIONAL JOURNAL OF BUSINESS AND SOCIETY, 2018, 19 (03): : 886 - 903
  • [35] Investigating the determinants of household energy consumption in Nigeria: insights and implications
    Abubakar, Ismaila Rimi
    Alola, Andrew Adewale
    Bekun, Festus Victor
    Onifade, Stephen Taiwo
    ENERGY SUSTAINABILITY AND SOCIETY, 2024, 14 (01):
  • [36] Towards sustainable energy access: Investigating the relationship between renewable energy consumption and energy poverty
    Jithin, P.
    Renjith, R.
    ENERGY POLICY, 2025, 200
  • [37] The effect of energy performance regulations on energy consumption
    Guerra-Santin, Olivia
    Itard, Laure
    ENERGY EFFICIENCY, 2012, 5 (03) : 269 - 282
  • [38] The effect of energy performance regulations on energy consumption
    Olivia Guerra-Santin
    Laure Itard
    Energy Efficiency, 2012, 5 : 269 - 282
  • [39] Investigating On-Site Energy Consumption Patterns Using Vertical Electrical Sounding (VES) and Geographic Information System (GIS) Techniques
    Abdullah, Haris
    Farid, Hafiz Umar
    Naeem, Maira
    Zubair, Nadeem
    Khan, Zahid Mahmood
    Shahzad, Huzaifa
    Sikandar, Pervaiz
    Abrar, Muhammad
    Shakoor, Aamir
    Mubeen, Muhammad
    SUSTAINABILITY, 2023, 15 (24)
  • [40] Energy access: Revelations from energy consumption patterns in rural India
    Srivastava, Leena
    Goswami, Anandajit
    Diljun, Gaurang Meher
    Chaudhury, Saswata
    ENERGY POLICY, 2012, 47 : 11 - 20