An Attempt to Catch Up with JIT Compilers: The False Lead of Optimizing Inline Caches
2025/02/15 by Aurore Poirier, Erven Rohou, Manuel Serrano · 14 voices
Computer Science · #Parallel Computing and Optimization Techniques #Distributed and Parallel Computing Systems
paper · pdf · doi:10.22152/programming-journal.org/2026/10/6
Abstract
Context: Just-in-Time (JIT) compilers are able to specialize the code they generate according to a continuous profiling of the running programs. This gives them an advantage when compared to Ahead-of-Time (AoT) compilers that must choose the code to generate once for all. Inquiry: Is it possible to improve the performance of AoT compilers by adding Dynamic Binary Modification (DBM) to the executions? Approach: We added to the Hopc AoT JavaScript compiler a new optimization based on DBM to the inline cache (IC), a classical optimization dynamic languages use to implement object property accesses efficiently. Knowledge: Reducing the number of memory accesses as the new optimization does, does not shorten execution times on contemporary architectures. Grounding: The DBM optimization we have implemented is fully operational on x8664 architectures. We have conducted several experiments to evaluate its impact on performance and to study the reasons of the lack of acceleration. Importance: The (negative) result we present in this paper sheds new light on the best strategy to be used to implement dynamic languages. It tells that the old days were removing instructions or removing memory reads always yielded to speed up is over. Nowadays, implementing sophisticated compiler optimizations is only worth the effort if the processor is not able by itself to accelerate the code. This result applies to AoT compilers as well as JIT compilers.
Discussions
- An Attempt to Catch Up with JIT Compilers [hn, 203 points, 142 comments]
- This is a very nice paper! (Love the "summary by example" section!) arxiv.org/pdf/2502.20547 [bsky, 5 points, 0 comments]
- "An Attempt to Catch Up with JIT Compilers" New ways to improve JavaScript runtimes may soak up data to boost performance on coding tasks. Mixing languages can help, making each tool shine at what it [bsky, 3 points, 0 comments]
- Personally, my guess is that the story is not as simple as "inline caches don't help on modern CPUs": I would guess that "in context X, inline caches don't help" but there will be other contexts where [bsky, 2 points, 1 comments]
- An Attempt to Catch Up with JIT Compilers #HackerNews https://arxiv.org/abs/2502.20547 [bsky, 0 points, 0 comments]
- An Attempt to Catch Up with JIT Compilers https://arxiv.org/abs/2502.20547 https://news.ycombinator.com/item?id=43243109 [bsky, 0 points, 0 comments]
- An Attempt to Catch Up with JIT Compilers https://arxiv.org/abs/2502.20547 [bsky, 0 points, 0 comments]
- An Attempt to Catch Up with JIT Compilers https://arxiv.org/abs/2502.20547 [comments] [68 points] [telegram] [bsky, 0 points, 0 comments]
- An Attempt to Catch Up with JIT Compilers https://arxiv.org/abs/2502.20547 (https://news.ycombinator.com/item?id=43243109) [bsky, 0 points, 0 comments]
- An Attempt to Catch Up with JIT Compilers https://arxiv.org/abs/2502.20547 (http://news.ycombinator.com/item?id=43243109) [bsky, 0 points, 0 comments]
- An Attempt to Catch Up with JIT Compilers (arxiv.org) Main Link | Discussion [bsky, 0 points, 0 comments]
- An Attempt to Catch Up with JIT Compilers [bsky, 0 points, 0 comments]
- https://arxiv.org/abs/2502.20547 この海外論文では、AOTコンパイラのパフォーマンスを改善するために、DBMに基づく新しい最適化をインラインキャッシュに追加する試みについて解説。 実験の結果、メモリへのアクセス回数を減らす最適化は、現代のアーキテクチャでは実行時間の短縮に繋がらないことが判明。 この結果は、動的言語の実装戦略において、プロセッサがコードを自動的に加速 [bsky, 0 points, 0 comments]
- An Attempt to Catch Up with JIT Compilers https://arxiv.org/abs/2502.20547 (https://news.ycombinator.com/item?id=43243109) [bsky, 0 points, 0 comments]
Related