Why is Wren fast?

∞ 2017-04-06

A neat little collection of tricks to make an interpreted, dynamically typed language fast.

The short version is: a compact value representation, fixed object layout, copy-down inheritance, method signatures, computed gotos and a single-pass compiler.

The entire thing seems to be inspired by Lua, which is also known to be quite fast.

The author of Wren, Bob Nystrom, also wrote a book about implementing languages, which looks to be really neat as well. The existing parts are already excellent, but for the unfinished low-level details you’ll have to look elsewhere for now.

  • language
  • programming
  • compiler
  • design