Performance of Python Idioms

Supplementary Document

performance_python_idioms_supplementary_document.pdf provides code examples of idiomatic code and non-idiomatic code on synthetic dataset and real-project dataset,the detailed discussions on Stack Overflow about the performance of python idioms, the calculation of the number of code pairs for Python idioms, bytecode instructions of non-idiomatic code and idiomatic code for Python idioms.

Data:

  1. Synthetic dataset and Real-project dataset are in data/two-datasets/
  2. Formative study: discussions on Stack Overflow about performance of nine Python idioms is in data/formative_study.csv

Code:

  1. You could set the absolute path of project in the code1/util.py
  2. Performance measurement for synthetic dataset and real-project dataset are in code1/lab_performance/PythonIdiom/get_*_time.py and code1/performance/get_*_time.py
  3. plotting the distribution of performance change of nine Python idioms on two datasets is in the code1/rq1_boxplot.py
  4. Relationship between features and performance change in synthetic dataset and real-project dataset is in code1/lab_performance/PythonIdiom/analysis_*_features.R and code1/performance/PythonIdiom/analysis_*_features.R