GFTrans: an on-the-fly static analysis framework for code performance profiling
Jie Li, Yunbao Wen, Jingxin Liu, Biqing Zeng, Seyedali Mirjalili

TL;DR
GFTrans is a new static analysis tool that predicts C program performance without running the code, helping developers find and fix bottlenecks quickly.
Contribution
GFTrans introduces a novel static analysis framework using anchor-based embeddings and a dynamic gating mechanism for performance prediction.
Findings
GFTrans achieves 78.64% accuracy in predicting C code performance, outperforming baselines like Random Forest and Code2Vec.
The framework identifies performance bottlenecks in milliseconds, enabling real-time optimization during coding.
Anchor-based embeddings and dynamic gating effectively capture code complexity by integrating control flow and data dependencies.
Abstract
Improving software efficiency is crucial for maintenance, but pinpointing runtime bottlenecks becomes increasingly difficult as systems expand. Traditional dynamic profiling tools require full build-execution cycles, creating significant latency that impedes agile development. To address this, we introduce GFTrans, a static analysis framework that predicts c program performance without execution. GFTrans utilizes a Transformer architecture with a novel “anchor-based embedding” technique to integrate control flow and data dependencies into a unified sequence. Additionally, a dynamic gating mechanism fuses these semantic representations with 16 handcrafted statistical features to comprehensively capture code complexity. Evaluated on a dataset of real-world GitHub c functions with high-precision runtime labels, GFTrans outperforms baseline models like Random Forest and Code2Vec, achieving…
Click any figure to enlarge with its caption.
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Software Testing and Debugging Techniques · Software System Performance and Reliability
