Knowledgebase

Understanding Interpreters and Runtimes Print

  • specialisedtechnology, specialised, performance, guide, howto, solution, zillionkinghost, hosting
  • 0

Executing without ahead-of-time compilation.

WHAT AN INTERPRETER DOES

Executes a program directly, translating as it runs.

WHAT A BYTECODE INTERPRETER DOES

Compiles to a compact intermediate form, then executes that.

WHY THAT IS FASTER

The parsing and analysis happen once rather than repeatedly.

WHAT A VIRTUAL MACHINE IS

The environment executing that bytecode.

WHAT JUST-IN-TIME COMPILATION DOES

Compiles frequently executed code to machine code while running.

WHY THAT WORKS WELL

It can optimise using information only available at runtime, such as actual types.

WHAT DEOPTIMISATION IS

Reverting to interpretation when an assumption proves wrong.

WHAT GARBAGE COLLECTION DOES

Reclaims memory no longer reachable.

WHAT APPROACHES EXIST

Tracing from roots to find reachable objects Reference counting Generational approaches, collecting young objects frequently

WHY GENERATIONAL COLLECTION WORKS

Most objects die young, so collecting them is cheap and productive.

WHAT COLLECTION COSTS

Pauses, memory overhead, and less predictable timing.

WHAT TO TUNE

Heap sizing, and collector choice, where the runtime allows.

WHAT TO MEASURE

Pause times, not only throughput.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot