[Paper Review] MAGPIE: Machine Automated General Performance Improvement via Evolution of Software
MAGPIE is a unified framework that enables automated, synergistic performance improvement of software by representing all optimization techniques—compiler flags, algorithm configuration, and genetic code mutation—as sequences of edits. Using a shared representation and local search, it achieves up to 97% running time reduction via algorithm configuration and up to 10% further speedup through combined techniques, with joint optimization outperforming individual methods in specific cases like MiniSAT and Weka.
Performance is one of the most important qualities of software. Several techniques have thus been proposed to improve it, such as program transformations, optimisation of software parameters, or compiler flags. Many automated software improvement approaches use similar search strategies to explore the space of possible improvements, yet available tooling only focuses on one approach at a time. This makes comparisons and exploration of interactions of the various types of improvement impractical. We propose MAGPIE, a unified software improvement framework. It provides a common edit sequence based representation that isolates the search process from the specific improvement technique, enabling a much simplified synergistic workflow. We provide a case study using a basic local search to compare compiler optimisation, algorithm configuration, and genetic improvement. We chose running time as our efficiency measure and evaluated our approach on four real-world software, written in C, C++, and Java. Our results show that, used independently, all techniques find significant running time improvements: up to 25% for compiler optimisation, 97% for algorithm configuration, and 61% for evolving source code using genetic improvement. We also show that up to 10% further increase in performance can be obtained with partial combinations of the variants found by the different techniques. Furthermore, the common representation also enables simultaneous exploration of all techniques, providing a competitive alternative to using each technique individually.
Motivation & Objective
- To address the lack of comparison and combination between diverse software performance improvement techniques such as compiler optimization, algorithm configuration, and genetic improvement.
- To enable fair, systematic comparison of different optimization techniques by decoupling the search strategy from the specific improvement technique.
- To explore synergistic interactions between improvements at different granularities—e.g., compiler flags, configuration parameters, and code mutations.
- To evaluate whether simultaneous exploration of multiple improvement techniques yields better performance than independent or combined use of individually optimized variants.
- To provide a practical, extensible framework for researchers and practitioners to prototype and compare new optimization strategies.
Proposed method
- Represent all software improvements as sequences of atomic edits, abstracting away the underlying technique (e.g., compiler flag changes, configuration tweaks, code mutations).
- Use a common local search strategy across all three techniques to ensure fair comparison of performance gains.
- Implement three core techniques: compiler optimization (via GCC/JVM flags), algorithm configuration (tuning user-exposed parameters), and genetic improvement (mutating source code).
- Apply the same search budget to all techniques and combine the best-performing variants through recombination to assess synergy.
- Simultaneously train on all three search spaces (compiler, configuration, code) to explore joint improvements, using the same edit-sequence representation.
- Use fitness evaluation based on running time and, in one case, solution quality to guide the search and assess multi-objective outcomes.
Experimental results
Research questions
- RQ1RQ1: Can a unified representation enable fair comparison of performance improvements across compiler optimization, algorithm configuration, and genetic improvement?
- RQ2RQ2: How effective are individual techniques in reducing running time across real-world C, C++, and Java applications?
- RQ3RQ3: Can recombination of the best variants from each technique yield additional performance gains beyond individual improvements?
- RQ4RQ4: Does joint optimization across all three techniques outperform individual or combined approaches in terms of performance?
- RQ5RQ5: What is the impact of search space complexity when simultaneously exploring compiler, configuration, and code-level changes?
Key findings
- Compiler optimization achieved up to 25% reduction in running time across the four real-world applications.
- Algorithm configuration yielded the highest improvement, with up to 97% reduction in running time, particularly effective in Weka and MiniSAT.
- Genetic improvement of source code achieved up to 61% performance gain, demonstrating significant potential for low-level code optimization.
- Partial recombination of the best variants from each technique led to an additional 10% performance improvement in some scenarios.
- Joint training on all three techniques produced a 40% faster MiniSAT variant—surpassing both individual techniques and combined variants—highlighting synergistic gains.
- In Weka, joint training achieved a 57% reduction in misclassification rate and a 36% speedup, demonstrating multi-objective benefits.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.