Talk
Intermediate

JIT compilers – inside and out

Review Pending

Session Description

Many still consider JIT compilation a dark artform.

While writing a production JIT like numba[1] or V8[2] is a tall order,

the fundamental principles behind JIT are not.


To demonstrate, we'll use a toy JIT compiler for a turing complete language.

We'll go over a toy interpreter that uses op-code based dispatch to execute a program.

Then, we will learn the ins-and-outs of a dynamic code generator to emit x64 machine code.

Finally, we will benchmark both versions to see how they compare.


At the end, we'll look at "fancy" features like compile time translation of assembly to machine code instructions.


We'll be using Zig[3] – a systems programming language with drop-in C-interop

to write the compiler.


1: https://numba.pydata.org/

2: https://v8.dev/blog/maglev

3: https://ziglang.org


Key Takeaways

None

References

Session Categories

FOSS

Speakers

Srijan Paul
Language engineer DeepSource
Srijan Paul

Reviews

0 %
Approvability
0
Approvals
0
Rejections
0
Not Sure
No reviews yet.