Chasing JIT Compilers: The False Promise of Optimizing Inline Caches

2025-03-13
Chasing JIT Compilers: The False Promise of Optimizing Inline Caches

This paper investigates improving Ahead-of-Time (AoT) compiler performance by adding Dynamic Binary Modification (DBM). Researchers implemented a DBM-based inline cache (IC) optimization in the Hopc AoT JavaScript compiler. However, experiments showed no performance improvement. The study found that reducing memory accesses doesn't always speed up execution on modern architectures, challenging traditional optimization strategies. It concludes that sophisticated compiler optimizations are only worthwhile if the processor can't already accelerate the code, a finding applicable to both AoT and JIT compilers.

Read more

Coherence in Type Classes: A Comparison of Swift, Rust, Scala, and Haskell

2025-03-12
Coherence in Type Classes: A Comparison of Swift, Rust, Scala, and Haskell

Type classes are a popular mechanism for generic programming, used in languages like Haskell, Swift, Rust, and Scala. However, implicit programming, while convenient, can lead to ambiguity in type inference, jeopardizing coherence (the property that a program has exactly one meaning). The research community is divided: some favor context-sensitive resolution; others advocate for globally unique instances to prevent ambiguity. This paper compares how these four languages address type class coherence, revealing that despite syntactic differences, their strategies for circumventing limitations of unique instances are strikingly similar.

Read more