Supersonic: Learning to Generate Source Code Optimizations in C/C++

N/ACitations
Citations of this article
23Readers
Mendeley users who have this article in their library.

This article is free to access.

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 xt, xt+1, where xt+1 is an optimized version of xt, 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.

Cite

CITATION STYLE

APA

Chen, Z., Fang, S., & Monperrus, M. (2024). Supersonic: Learning to Generate Source Code Optimizations in C/C++. IEEE Transactions on Software Engineering, 50(11), 2849–2864. https://doi.org/10.1109/TSE.2024.3423769

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free