Performance issues hinder software efficiency and reliability. Mining software repositories can reveal such issues, but existing keyword, heuristic, and machine learning based methods lack semantic understanding and scalability for large scale analysis. This paper presents PerfMiner, an LLM guided framework for identifying and curating performance related commits at scale. PerfMiner employs PerfAnnotator-mini, a lightweight transformer distilled from a large language model to balance semantic reasoning with computational efficiency.
Using this framework, we analyzed 170 million commits from 323,700 repositories in C++, Java, and Python, producing a curated dataset of 335,103 real world performance related commits. A manual audit of the mined dataset (n = 384) confirmed a precision of approximately 0.90, supporting the reliability of automated labeling. On the curated ground truth evaluation set (n = 1,350), PerfAnnotator-mini attains an F1 score of 0.89 with precision of 0.89. Inference is 381 times faster than the 20B parameter teacher model (gpt-oss:20b) on an NVIDIA RTX 4090 GPU.
These results indicate that the proposed LLM guided semantic reasoning approach provides a scalable and practical foundation for large scale studies of performance related behavior in software repositories.