Skip to main content

LUP Student Papers

LUND UNIVERSITY LIBRARIES

A Tracing JIT Compiler for Erlang using LLVM

Fänge, Johan LU (2015) In 1650-2884 EDA920 20102
Department of Computer Science
Abstract
We have modified the Erlang runtime to add support for a tracing just-in-time
(JIT) compiler, similar to Mozilla’s TraceMonkey.

Tracing is a technique to augment an existing interpreter with a JIT simply
by recording the instructions executed during a loop iteration, and then generate optimized native code from this. Tracing compilers are particularly suited to optimize number crunching tight loops, an area where Erlang traditionally has been lacking. We make use of the LLVM compiler library to optimize and emit native code.

In micro benchmarks we show some major improvements, reducing execution
time by up to 75%.

However, from an engineering point of view, we conclude that the effort of
an industrial strength implementation... (More)
We have modified the Erlang runtime to add support for a tracing just-in-time
(JIT) compiler, similar to Mozilla’s TraceMonkey.

Tracing is a technique to augment an existing interpreter with a JIT simply
by recording the instructions executed during a loop iteration, and then generate optimized native code from this. Tracing compilers are particularly suited to optimize number crunching tight loops, an area where Erlang traditionally has been lacking. We make use of the LLVM compiler library to optimize and emit native code.

In micro benchmarks we show some major improvements, reducing execution
time by up to 75%.

However, from an engineering point of view, we conclude that the effort of
an industrial strength implementation would be substantial – essentially reimplementing large parts of Erlang’s interpreter – and discuss a potential solution based on recent research in the area. (Less)
Popular Abstract (Swedish)
Nästan alla moderna programspråk använder en interpretator – en flexibel och
praktisk om än långsam lösning. Vi prövar ett enkelt sätt att kraftigt öka prestandan på Erlangs interpretator.
Please use this url to cite or link to this publication:
author
Fänge, Johan LU
supervisor
organization
course
EDA920 20102
year
type
H3 - Professional qualifications (4 Years - )
subject
keywords
erlang, tracing, jit, llvm, beam
publication/series
1650-2884
report number
LU-CS-EX 2015-16
ISSN
1650-2884
language
English
id
5470892
date added to LUP
2015-06-10 12:08:07
date last changed
2015-06-10 12:08:07
@misc{5470892,
  abstract     = {{We have modified the Erlang runtime to add support for a tracing just-in-time
(JIT) compiler, similar to Mozilla’s TraceMonkey.

Tracing is a technique to augment an existing interpreter with a JIT simply
by recording the instructions executed during a loop iteration, and then generate optimized native code from this. Tracing compilers are particularly suited to optimize number crunching tight loops, an area where Erlang traditionally has been lacking. We make use of the LLVM compiler library to optimize and emit native code.

In micro benchmarks we show some major improvements, reducing execution
time by up to 75%.

However, from an engineering point of view, we conclude that the effort of
an industrial strength implementation would be substantial – essentially reimplementing large parts of Erlang’s interpreter – and discuss a potential solution based on recent research in the area.}},
  author       = {{Fänge, Johan}},
  issn         = {{1650-2884}},
  language     = {{eng}},
  note         = {{Student Paper}},
  series       = {{1650-2884}},
  title        = {{A Tracing JIT Compiler for Erlang using LLVM}},
  year         = {{2015}},
}