How Software Refactoring Impacts Execution Time

Author:

Traini Luca1ORCID,Di Pompeo Daniele1ORCID,Tucci Michele1ORCID,Lin Bin2ORCID,Scalabrino Simone3ORCID,Bavota Gabriele2ORCID,Lanza Michele2,Oliveto Rocco3,Cortellessa Vittorio1

Affiliation:

1. University of L’Aquila, L’Aquila, Italy

2. Software Institute - USI, Lugano, Swizerland

3. University of Molise, Pesche (IS), Italy

Abstract

Refactoring aims at improving the maintainability of source code without modifying its external behavior. Previous works proposed approaches to recommend refactoring solutions to software developers. The generation of the recommended solutions is guided by metrics acting as proxy for maintainability (e.g., number of code smells removed by the recommended solution). These approaches ignore the impact of the recommended refactorings on other non-functional requirements, such as performance, energy consumption, and so forth. Little is known about the impact of refactoring operations on non-functional requirements other than maintainability. We aim to fill this gap by presenting the largest study to date to investigate the impact of refactoring on software performance, in terms of execution time. We mined the change history of 20 systems that defined performance benchmarks in their repositories, with the goal of identifying commits in which developers implemented refactoring operations impacting code components that are exercised by the performance benchmarks. Through a quantitative and qualitative analysis, we show that refactoring operations can significantly impact the execution time. Indeed, none of the investigated refactoring types can be considered “safe” in ensuring no performance regression. Refactoring types aimed at decomposing complex code entities (e.g., Extract Class/Interface, Extract Method) have higher chances of triggering performance degradation, suggesting their careful consideration when refactoring performance-critical code.

Funder

Swiss National Science foundation

Publisher

Association for Computing Machinery (ACM)

Subject

Software

Cited by 6 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Navigating Complexity in Software Engineering: A Prototype for Comparing GPT-n Solutions;2023 IEEE/ACM 5th International Workshop on Bots in Software Engineering (BotSE);2023-05

2. Faster or Slower? Performance Mystery of Python Idioms Unveiled with Empirical Evidence;2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE);2023-05

3. Probabilistic program performance analysis with confidence intervals;Information and Software Technology;2023-04

4. DeLag: Using Multi-Objective Optimization to Enhance the Detection of Latency Degradation Patterns in Service-Based Systems;IEEE Transactions on Software Engineering;2023

5. Automated Identification of Performance Changes at Code Level;2022 IEEE 22nd International Conference on Software Quality, Reliability and Security (QRS);2022-12

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3