Faster or Slower? Performance Mystery of Python Idioms Unveiled with Empirical Evidence.
Saved in:
| Title: | Faster or Slower? Performance Mystery of Python Idioms Unveiled with Empirical Evidence. |
|---|---|
| Authors: | Zhang, Zejun1 zejun.zhang@anu.edu.au, Xing, Zhenchang2 zhenchang.xing@anu.edu.au, Xia, Xin3 xin.xia@acm.org, Xu, Xiwei4 xiwei.xu@data61.csiro.au, Zhu, Liming4 liming.zhu@data61.csiro.au, Lu, Qinghua4 qinghua.lu@data61.csiro.au |
| Source: | ICSE: International Conference on Software Engineering. 2023, p1495-1507. 13p. |
| Subjects: | Python programming language, Idioms, Stack Overflow (Company), Data analysis, Descriptive statistics |
| Abstract: | The usage of Python idioms is popular among Python developers in a formative study of 101 Python idiom performance related questions on Stack Overflow, we find that developers often get confused about the performance impact of Python idioms and use anecdotal toy code or rely on personal project experience which is often contradictory in performance outcomes. There has been no large-scale, systematic empirical evidence to reconcile these performance debates. In the paper, we create a large synthetic dataset with 24,126 pairs of non-idiomatic and functionally-equivalent idiomatic code for the nine unique Python idioms identified in [1], and reuse a large real-project dataset of 54,879 such code pairs provided in [1]. We develop a reliable performance measurement method to compare the speedup or slowdown by idiomatic code against non-idiomatic counterpart, and analyze the performance discrepancies between the synthetic and real-project code, the relationships between code features and performance changes, and the root causes of performance changes at the bytecode level. We summarize our findings as some actionable suggestions for using Python idioms. [ABSTRACT FROM AUTHOR] |
| Copyright of ICSE: International Conference on Software Engineering is the property of Association for Computing Machinery and its content may not be copied or emailed to multiple sites without the copyright holder's express written permission. Additionally, content may not be used with any artificial intelligence tools or machine learning technologies. However, users may print, download, or email articles for individual use. This abstract may be abridged. No warranty is given about the accuracy of the copy. Users should refer to the original published version of the material for the full abstract. (Copyright applies to all Abstracts.) | |
| Database: | Engineering Source |
|
Full text is not displayed to guests.
Login for full access.
|
|
| Abstract: | The usage of Python idioms is popular among Python developers in a formative study of 101 Python idiom performance related questions on Stack Overflow, we find that developers often get confused about the performance impact of Python idioms and use anecdotal toy code or rely on personal project experience which is often contradictory in performance outcomes. There has been no large-scale, systematic empirical evidence to reconcile these performance debates. In the paper, we create a large synthetic dataset with 24,126 pairs of non-idiomatic and functionally-equivalent idiomatic code for the nine unique Python idioms identified in [1], and reuse a large real-project dataset of 54,879 such code pairs provided in [1]. We develop a reliable performance measurement method to compare the speedup or slowdown by idiomatic code against non-idiomatic counterpart, and analyze the performance discrepancies between the synthetic and real-project code, the relationships between code features and performance changes, and the root causes of performance changes at the bytecode level. We summarize our findings as some actionable suggestions for using Python idioms. [ABSTRACT FROM AUTHOR] |
|---|---|
| DOI: | 10.1109/ICSE48619.2023.00130 |