PhD student at the Programming Research Laboratory, FIT CTU in Prague.
rihafili at fit dot cvut dot cz
@inproceedings{2026-vmil-r-benchmarks,
title = {{What Do R Benchmarks Measure: Toward a Performance-Characterized Benchmark Suite for R}},
author = {Matěj Kocourek and Filip Říha and Oliver Tušla and Pierre Donat-Bouillud and Filip Křikava and Jan Vitek},
year = {2026},
doi = {10.1145/3840562.3844972},
booktitle = {VMIL},
}
@inproceedings{2026-splash-issta-tool-bench,
title = {{bench: A Programmable Command-Line Framework for Complex Benchmarking Workflows}},
author = {Filip Říha and Filip Křikava},
year = {2026},
doi = {10.1145/3837729.3840502},
booktitle = {{SPLASH Companion '26}},
}
@inproceedings{2026-ecoop-feedback-in-jits,
title = {{Characterizing Type Feedback in Just-in-Time Compilation}},
author = {Sebastián Krynski and Filip Říha and Filip Křikava and Jan Vitek},
year = {2026},
doi = {10.4230/LIPIcs.ECOOP.2026.16},
booktitle = {ECOOP},
}
@inproceedings{2024-vmil-feedback-pollution,
title = {{Reducing Feedback Pollution}},
author = {Sebastián Krynski and Michal Štěpánek and Filip Říha and Filip Křikava and Jan Vitek},
booktitle = {VMIL'24},
year = {2024},
doi = {10.1145/3689490.3690404},
}
Many programming language implementations have a benchmark suite that consists of a fixed set of programs with a harness and clear maintenance. R has none. Instead, R implementations are evaluated on ad hoc sets of programs and harnesses with different timing conventions. This paper is a step toward a benchmarking suite for R. We collect 118 R programs from 8 repositories and put them under a single harness. Next, we characterize their performance profiles, which show the share of the run spent in different regions of the R virtual machine (e.g., bytecode interpreter, memory management, builtin functions). This allows us to classify benchmarks by what they exercise so we can create suites that target a specific use such as compiler optimizations. On three R compilers, the speedups follow the profiles. They concentrate in the interpreter-bound programs and vanish in the ones dominated by native code. The profiles also cut the cost of running a suite. Dropping the 53 programs dominated by native code or builtins leaves 65 programs and saves 51.7% of the running time of the corpus.
Benchmarking provides much of the feedback that drives systems and language research, yet sound benchmarking is hard. As experiments grow, added programs, configurations, custom metrics, warmup, failures, and machine noise can all mislead. We present bench, a tool that keeps simple measurements simple and lets complex experiments scale without leaving a general-purpose language. It offers a command-line interface for ad-hoc runs and a small, almost declarative Python API for repeatable experiments, both backed by one engine. A builder API resolves a suite of benchmarks lazily against a typed context, so a single script can be parametrized from the command line, discover its workloads at run time, and treat process benchmarks and in-process harnesses through one pipeline. We have successfully used it to simplify the benchmarking infrastructure for our R just-in-time compiler, used it in classes benchmarking student virtual machines, and driving established suites such as Renaissance or SPEC.
Just-in-time (JIT) compilers leverage type feedback to optimize dynamic languages by recording runtime observations during interpretation and using them to generate specialized code. However, this recording process introduces significant execution time overhead to program warmup. This paper presents a characterization study of how feedback information is utilized by JIT compilers, providing motivation for future work on reducing recording overhead. We instrument the Ř compiler for the R language to track feedback slot usage throughout compilation, analyzing well-known benchmarks and real-world programs. Our measurements reveal that recording adds overhead to the interpreter up to 1.6× (mean 1.2×), yet at least 59% of non-empty slots are not used by the compiler. A large fraction of these unused slots can be attributed to dead code that the compiler eliminated. Most of the remaining slots are type-stable - meaning the inferred type matches the observed type - making speculation futile. To quantify the potential for improvement, we evaluate two oracle-based configurations that establish upper bounds on achievable reduction: a conservative set approach that preserves optimization quality while improving warmup, and an optimistic set approach that sacrifices some compiled code performance for faster interpretation.
Dynamic languages such as Python, Ruby, or R rely heavily on native C/C++ functions using a foreign function interface. While they significantly speed up baseline performance, these functions are opaque to a Just-in-time compiler — parameter and return types, side effects, and argument counts are not exposed for optimization. We propose an approach that analyzes native code in the context of the host VM, opening up the semantics of native code without the need for manual transformation. From this we identify three use cases: a) inferring precise types and side effects for JIT specialization, b) modeling the dynamic language semantics in the same IR, enabling whole-program analysis, and c) extracting specialized native code slices that only capture the main logic for subsets of inputs.
Feedback information is used by Just-in-time compilers as the piece that glues together the runtime and the static worlds by enriching static type information with runtime observations. The compiler can speculate on the observed behavior, which is crucial for unlocking a number of optimizations. The more dynamic features a language has, the more relevant the runtime information becomes when generating performant code. This is the case with R, a highly dynamic programming language that combines delayed evaluation and side effects with first-class environments and full reflective capabilities that can even access and modify the state of stack frames at any time. However, recording feedback information considerably impacts the execution and memory of an interpreter, which leads to the question: Is all the information recorded really needed? In this study, we look at how the feedback information is used in Ř, a just-in-time compiler for the language R. We perform a study on a set of well-known benchmarks and a few real-world programs, reporting on the feedback usage and categorizing how the information is used (or not used) during a compilation.
Modern dynamic languages often leverage Just-in-Time (JIT) compilers to improve performance of frequently executed code. These compilers use the feedback collected at runtime to make speculations about future execution, making further optimization possible. However, over time, the accuracy of this feedback can degrade, leading to less precise speculations and performance degradation. This phenomenon is known as feedback pollution.
The R programming language is highly specialized for statistical computing and data visualization, and thanks to its features such as reflection and lazy evaluation, it can be difficult to optimize. The Ř JIT compiler tries to improve the performance of R by using speculations on the observed feedback in order to increase the performance of the compiled code.
The primary objective of this thesis is to develop a tool that allows for detailed observation and analysis of the behavior of the Ř JIT compiler, as otherwise the inner workings of the compiler are a black box. By having the facilities to examine the JIT internals, we open up possibilities for further research and analysis, including the understanding of feedback pollution and feedback usage explored in this thesis.
Just-in-time compilers enhance the performance of future invocations of a function by generating code tailored to past behavior. To achieve this, compilers use a data structure, often referred to as a feedback vector, to record information about each function’s invocations. However, over time, feedback vectors tend to become less precise, leading to lower-quality code – a phenomenon known as feedback vector pollution. This paper examines feedback vector pollution within the context of a compiler for the R language. We provide data, discuss an approach to reduce pollution in practice, and implement a proof-of-concept implementation of this approach. The preliminary results of the implementation indicate ∼30% decrease in polluted compilations and ∼37% decrease in function pollution throughout our corpus.
This thesis provides an implementation of a Smalltalk programing language dialect called Simple Object Machine (SOM) in Haskell, a purely functional language. It explores the syntax and semantics of a SOM program and analyses already existing implementations. Then it provides the design and implementation details of the virtual machine, that is based on bytecode instructions and a bytecode interpreter. The parts of the VM are individualy explored, which are lexer, parser, compiler, runtime environment and garbage collector.