0Pricing
Lua Academy · Lesson

LuaJIT Architecture Overview

How LuaJIT's tracing JIT works vs the standard Lua VM interpreter.

What Is LuaJIT?

LuaJIT is a Just-In-Time compiler for Lua 5.1. It is significantly faster than the standard Lua VM for numeric and loop-heavy code, while remaining 100% compatible.

Two Execution Modes

LuaJIT has two modes: the interpreter (a fast bytecode interpreter, faster than PUC Lua's) and the JIT compiler (traces hot loops to native machine code).

All lessons in this course

  1. LuaJIT Architecture Overview
  2. Writing JIT-Friendly Lua
  3. Profiling with jit.p and perf
  4. Benchmarking Patterns
← Back to Lua Academy