Performance Smells in ML and Non-ML Python Projects: A Comparative Study

📅 2025-04-28
📈 Citations: 0
Influential: 0
📄 PDF

career value

152K/year
🤖 AI Summary
This study presents the first systematic comparison of performance anti-patterns—i.e., recurring suboptimal coding practices harming runtime efficiency—between machine learning (ML) and non-ML Python projects. Analyzing 300 open-source GitHub repositories, we employed the RIdiom tool to detect anti-patterns and conducted empirical analysis to characterize their distribution and root causes. Results show that ML projects exhibit significantly higher prevalence of performance anti-patterns, concentrated predominantly in data preprocessing and also pervasive in model deployment stages. Crucially, the study reveals stage-specific anti-pattern distributions across the ML pipeline, moving beyond prior “black-box” analyses that treat ML projects monolithically. Key contributions are: (1) empirical validation that performance risks in ML systems are intrinsically stage-dependent; (2) demonstration that pipeline-stage-aware optimization strategies are both necessary and feasible; and (3) actionable, stage-targeted recommendations for improving data processing and model deployment efficiency.

Technology Category

Application Category

📝 Abstract
Python is widely adopted across various domains, especially in Machine Learning (ML) and traditional software projects. Despite its versatility, Python is susceptible to performance smells, i.e., suboptimal coding practices that can reduce application efficiency. This study provides a comparative analysis of performance smells between ML and non-ML projects, aiming to assess the occurrence of these inefficiencies while exploring their distribution across stages in the ML pipeline. For that, we conducted an empirical study analyzing 300 Python-based GitHub projects, distributed across ML and non-ML projects, categorizing performance smells based on the RIdiom tool. Our results indicate that ML projects are more susceptible to performance smells likely due to the computational and data-intensive nature of ML workflows. We also observed that performance smells in the ML pipeline predominantly affect the Data Processing stage. However, their presence in the Model Deployment stage indicates that such smells are not limited to the early stages of the pipeline. Our findings offer actionable insights for developers, emphasizing the importance of targeted optimizations for smells prevalent in ML projects. Furthermore, our study underscores the need to tailor performance optimization strategies to the unique characteristics of ML projects, with particular attention to the pipeline stages most affected by performance smells.
Problem

Research questions and friction points this paper is trying to address.

Compare performance smells in ML vs non-ML Python projects
Analyze distribution of performance smells across ML pipeline stages
Identify ML projects' higher susceptibility to performance inefficiencies
Innovation

Methods, ideas, or system contributions that make the work stand out.

Comparative analysis of performance smells in ML and non-ML projects
Empirical study of 300 GitHub projects using RIdiom tool
Targeted optimizations for ML pipeline stages
🔎 Similar Papers
No similar papers found.