Back to talks

JIT: What Every Developer Should Know

An introduction to the JVM Just-In-Time compiler and its impact on application performance.

Javeloper · JUG Zielona Góra · JUG Łódź|Poland||40 minutes
Audience: Java developers, Backend engineers, JVM enthusiasts
javajvmjitperformance

The Java Virtual Machine includes one of the most sophisticated runtime optimization systems in modern software platforms: the Just-In-Time compiler (JIT).
While most developers rely on the JVM every day, relatively few understand how the JIT actually works and how it affects application performance.

This talk introduces the fundamentals of the JVM JIT compiler and explains how it improves the execution speed of Java applications.

During the session we explore how the JVM analyzes running code, identifies hot paths, and dynamically compiles bytecode into optimized machine instructions. Understanding this process helps developers better reason about performance behavior in production systems.

We also discuss how to observe JIT activity and monitor compilation behavior using built-in JVM tools.

Topics Covered

Introduction to the JVM JIT

  • What the Just-In-Time compiler is
  • Why the JVM uses JIT compilation
  • How runtime optimization works

Historical Context

  • How Java execution worked before advanced JIT optimizations
  • Evolution of the JVM execution model

Tiered Compilation

  • Interpreter vs compiled execution
  • C1 and C2 compilers
  • How the JVM decides when to compile code

Observing JIT Behavior

  • Monitoring compilation activity
  • Understanding compilation queues
  • Using tools such as jstat

Key Takeaways

  1. The JVM continuously optimizes code during runtime.
  2. Understanding JIT behavior helps explain many performance characteristics of Java applications.
  3. Built-in JVM tools allow developers to observe and analyze JIT compilation.
  4. Knowledge of the JIT can help diagnose performance issues in real systems.