Rafail Giavrimis

Rafail Giavrimis


About

My research project

Publications

Rafail Giavrimis, Michail Basios, Fan Wu, Leslie Kanthan, Roman Bauer (2025)Artemis AI: Multi-LLM Framework for Code Optimisation, In: 2025 IEEE Conference on Artificial Intelligence (CAI 2025)pp. 1-6 Institute of Electrical and Electronics Engineers (IEEE)

This paper introduces Artemis AI, a novel framework leveraging multiple Large Language Models (LLMs) op-timise code performance. Artemis AI achieves significant performance improvements in highly-optimised code across diverse domains with minimal changes. We focus on three representative open-source projects: QuantLib (quantitative finance), Llama2.c (natural language processing), and OpenAI Whisper (automatic speech recognition) and one proprietary high performance code-base. Our multi-stage process involves extracting target code snippets, independent optimisation by multiple LLMs, and a search-based selection of the optimal solutions, achieving a 30% reduction in execution time for QuantLib, a 52% reduction for Llama2.c, and a 15% reduction for OpenAI Whisper. These results highlight the potential of multi-LLM collaboration for substantial performance gains that lead to greener software while preserving code readability and reliability.

Constantin Cezar Petrescu, Sam Smith, Rafail Giavrimis, Santanu Kumar Dash (2023)Do names echo semantics? A large-scale study of identifiers used in C++’s named casts, In: Journal of Systems and Software202111693 Elsevier

Developers relax restrictions on a type to reuse methods with other types. While type casts are prevalent, in weakly typed languages such as C++, they are also extremely permissive. Assignments where a source expression is cast into a new type and assigned to a target variable of the new type, can lead to software bugs if performed without care. In this paper, we propose an information-theoretic approach to identify poor implementations of explicit cast operations. Our approach measures accord between the source expression and the target variable using conditional entropy. We collect casts from 34 components of the Chromium project, which collectively account for 27MLOC and random-uniformly sample this dataset to create a manually labelled dataset of 271 casts. Information-theoretic vetting of these 271 casts achieves a peak precision of 81% and a recall of 90%. We additionally present the findings of an in-depth investigation of notable explicit casts, two of which were fixed in recent releases of the Chromium project. •Information-theoretic approach to identify poor implementations of named casts.•Detecting poor naming choices for identifiers used in a cast operation.•Measuring accord between source and target identifiers using conditional entropy.•In-depth investigation of the use of C++ explicit cast operators from Chromium.•Provide open-source implementation and dataset of 271 manually labelled casts.

Additional publications