← Latest papers
⚛️ high-energy experiments

Static compilation of Julia packages for integration with existing HEP codebases: a case study with JetReconstruction.jl

This paper investigates the feasibility of integrating Julia into existing High-Energy Physics C++ codebases by presenting a case study on statically compiling the JetReconstruction.jl package, comparing the performance of Julia v1.12's new static compilation feature against PackageCompiler.jl, native Julia, and C++ FastJet.

Original authors: Mateusz Jakub Fila, Graeme A Stewart

Published 2026-07-28
📖 3 min read🧠 Deep dive

Original authors: Mateusz Jakub Fila, Graeme A Stewart

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine the universe is a giant, chaotic dance floor where subatomic particles zoom around, collide, and scatter in every direction. To understand the music of this dance, scientists in High-Energy Physics (HEP) build massive detectors to catch the particles and write complex computer programs to sort them out. For decades, the "dance floor managers" have relied on a very strict, very fast language called C++ to do this sorting. It's like a super-efficient assembly line that never stops, but it's also rigid and hard to change. Recently, a new, more flexible language called Julia has arrived on the scene. It promises to be just as fast as C++ but much easier for humans to write and understand, like swapping a rigid assembly line for a team of agile, creative robots. However, there's a catch: the old C++ machines don't know how to talk to the new Julia robots. The big question is: Can we teach the old machines to listen to the new robots without slowing everything down or breaking the assembly line?

This paper explores a specific experiment to answer that question using a tool called JetReconstruction.jl. In particle physics, when particles smash together, they often spray out a cone of debris called a "jet." Figuring out exactly what those jets are made of is a crucial step in the analysis. The authors took a fast, native Julia program designed to sort these jets and tried to "freeze" it into a static package that could be plugged directly into the existing C++ systems. They tested two different methods to do this freezing: one older method called PackageCompiler.jl and a brand-new feature in the latest Julia update (version 1.12) called JuliaC.jl. Think of it like trying to pack a dynamic, shape-shifting robot into a box so it can be shipped to a factory that only accepts rigid, pre-made parts.

The results show that while the idea is promising, the box isn't quite ready for prime time yet. The team found that they could successfully create these "boxed" versions of the Julia code, and once they were running, they were incredibly fast—often beating the traditional C++ FastJet program in speed. However, the process of packing them was heavy and slow. The resulting files were huge, weighing in at around 300 to 375 megabytes, compared to the tiny 8-megabyte C++ version. Furthermore, there was a "warm-up" problem. The first time the C++ system asked the Julia robot to do a job, it took a long time to start up (over 5,000 microseconds in one test) because the robot still had to do some last-minute thinking (just-in-time compilation) before it could get to work. After that first time, it flew through the rest of the tasks faster than the C++ version.

The authors conclude that while statically compiling Julia code is a viable path forward, it isn't a "plug-and-play" solution for high-stakes environments like particle colliders just yet. The tools need more work to shrink the file sizes and eliminate that initial startup delay. They also noted that making the code talk to C++ required careful planning because Julia's memory structures don't always fit neatly into the rigid C++ boxes without some extra engineering effort. Ultimately, the paper suggests that Julia has the speed to compete with C++, but the bridge between the two worlds still needs some reinforcement before it can handle the heavy traffic of future physics experiments.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →