Supersonic: Learning to Generate Source Code Optimizations in C/C++
Zimin Chen, Sen Fang, Martin Monperrus

TL;DR
Supersonic is a neural network-based tool that automates source code optimization in C/C++, outperforming large language models while being significantly smaller and more efficient.
Contribution
The paper introduces Supersonic, a seq2seq model that automates source code optimization, demonstrating superior performance and efficiency over large language models.
Findings
Supersonic outperforms GPT-3.5-Turbo and GPT-4 on code optimization tasks.
Supersonic is more than 600x smaller than GPT-3.5-Turbo and 3700x smaller than GPT-4.
Supersonic effectively minimizes code changes during optimization.
Abstract
Software optimization refines programs for resource efficiency while preserving functionality. Traditionally, it is a process done by developers and compilers. This paper introduces a third option, automated optimization at the source code level. We present Supersonic, a neural approach targeting minor source code modifications for optimization. Using a seq2seq model, Supersonic is trained on C/C++ program pairs (, ), where is an optimized version of , and outputs a diff. Supersonic's performance is benchmarked against OpenAI's GPT-3.5-Turbo and GPT-4 on competitive programming tasks. The experiments show that Supersonic not only outperforms both models on the code optimization task but also minimizes the extent of the change with a model more than 600x smaller than GPT-3.5-Turbo and 3700x smaller than GPT-4.
Peer 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.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsParallel Computing and Optimization Techniques · Software Engineering Research · Machine Learning and Data Classification
Methods{Dispute@FaQ-s}How to file a dispute with Expedia? · Multi-Head Attention · 15 Ways to Contact How can i speak to someone at Delta Airlines · Attention Is All You Need · Linear Layer · Attention Dropout · Dropout · Cosine Annealing · Refunds@Expedia|||How do I get a full refund from Expedia? · Weight Decay
