Faster or Slower? Performance Mystery of Python Idioms Unveiled with Empirical Evidence
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.
Fri 19 MayDisplayed time zone: Hobart change
11:00 - 12:30 | Developers' forumsSEIP - Software Engineering in Practice / Journal-First Papers / Technical Track / DEMO - Demonstrations at Meeting Room 102 Chair(s): Omar Haggag Monash University, Australia | ||
11:00 15mTalk | Automatic prediction of rejected edits in Stack Overflow Journal-First Papers Saikat Mondal University of Saskatchewan, Gias Uddin University of Calgary, Canada, Chanchal K. Roy University of Saskatchewan Link to publication DOI Pre-print | ||
11:15 15mTalk | Automated Summarization of Stack Overflow Posts Technical Track Bonan Kou Purdue University, Muhao Chen University of Southern California, Tianyi Zhang Purdue University | ||
11:30 15mTalk | Semi-Automatic, Inline and Collaborative Web Page Code Curations Technical Track Roy Rutishauser University of Zurich, André N. Meyer University of Zurich, Reid Holmes University of British Columbia, Thomas Fritz University of Zurich | ||
11:45 15mTalk | You Don’t Know Search: Helping Users Find Code by Automatically Evaluating Alternative Queries SEIP - Software Engineering in Practice Rijnard van Tonder Sourcegraph | ||
12:00 7mTalk | TECHSUMBOT: A Stack Overflow Answer Summarization Tool for Technical Query DEMO - Demonstrations Chengran Yang Singapore Management University, Bowen Xu Singapore Management University, Jiakun Liu Singapore Management University, David Lo Singapore Management University | ||
12:07 8mTalk | An empirical study of question discussions on Stack Overflow Journal-First Papers Wenhan Zhu University of Waterloo, Haoxiang Zhang Centre for Software Excellence at Huawei Canada, Ahmed E. Hassan Queen’s University, Michael W. Godfrey University of Waterloo, Canada | ||
12:15 15mTalk | Faster or Slower? Performance Mystery of Python Idioms Unveiled with Empirical Evidence Technical Track zejun zhang Australian National University, Zhenchang Xing , Xin Xia Huawei, Xiwei (Sherry) Xu CSIRO’s Data61, Liming Zhu CSIRO’s Data61, Qinghua Lu CSIRO’s Data61 |