TY - GEN
T1 - Impact of code refactoring using object-oriented methodology on a scientific computing application
AU - Kallen, Malin
AU - Holmgren, Sverker
AU - Hvannberg, Ebba Þóra
N1 - Publisher Copyright: © 2014 IEEE.
PY - 2014/12/4
Y1 - 2014/12/4
N2 - Methods and tools for refactoring of software have been extensively studied during the last decades, and we argue that there is now a need for additional studies of the effects of refactoring on code quality and external code attributes such as computational performance. To study these effects, we have refactored the central parts of a code base developed in academia for a class of computationally demanding scientific computing problems. We made design choices on the basis of the SOLID principles and we used object-oriented techniques, such as the Gang of Four patterns, in the implementation. In this paper, we discuss the effect on maintainability qualitatively and also analyze it quantitatively using a set of software metrics extending the Chidamber-Kemerer suite. Not surprisingly, we find that maintainability has increased as an effect of the refactoring. We also study performance and find that dynamic binding, which inhibits in lining by the compiler, in the most frequently executed parts of the code makes the execution times increase by over 700%. By exploiting static polymorphism, we have been able able to reduce the relative increase in execution times to less than 100%. We argue that the code version implementing static polymorphism is less maintainable than the one using dynamic polymorphism, although both versions are considerably more maintainable than the original code.
AB - Methods and tools for refactoring of software have been extensively studied during the last decades, and we argue that there is now a need for additional studies of the effects of refactoring on code quality and external code attributes such as computational performance. To study these effects, we have refactored the central parts of a code base developed in academia for a class of computationally demanding scientific computing problems. We made design choices on the basis of the SOLID principles and we used object-oriented techniques, such as the Gang of Four patterns, in the implementation. In this paper, we discuss the effect on maintainability qualitatively and also analyze it quantitatively using a set of software metrics extending the Chidamber-Kemerer suite. Not surprisingly, we find that maintainability has increased as an effect of the refactoring. We also study performance and find that dynamic binding, which inhibits in lining by the compiler, in the most frequently executed parts of the code makes the execution times increase by over 700%. By exploiting static polymorphism, we have been able able to reduce the relative increase in execution times to less than 100%. We argue that the code version implementing static polymorphism is less maintainable than the one using dynamic polymorphism, although both versions are considerably more maintainable than the original code.
KW - CRTP
KW - Design patterns
KW - High performance computing
KW - Maintainability
KW - Object orientation
KW - Refactoring
KW - Software metrics
KW - Static polymorphism
UR - https://www.scopus.com/pages/publications/84924905235
U2 - 10.1109/SCAM.2014.21
DO - 10.1109/SCAM.2014.21
M3 - Conference contribution
T3 - Proceedings - 2014 14th IEEE International Working Conference on Source Code Analysis and Manipulation, SCAM 2014
SP - 125
EP - 134
BT - Proceedings - 2014 14th IEEE International Working Conference on Source Code Analysis and Manipulation, SCAM 2014
PB - Institute of Electrical and Electronics Engineers Inc.
T2 - 14th IEEE International Working Conference on Source Code Analysis and Manipulation, SCAM 2014
Y2 - 28 September 2014 through 29 September 2014
ER -