EDDYMENS

Published 2 years ago

What Is A Just In Time Compiler Jit?

Table of contents

Definition

For a computer to execute our code [→] we need either a compiler [→] or interpreter [→] to convert it to machine code the computer understands.

Interpreters convert source code to machine code one chunk at a time, and the computer performs each action as and when this code is interpreted.

The thing with interpreters is that each time you rerun the code, this translation happens again. Just in time compilers make it possible to compile parts of the code so it can skip interpretation the next time that part of the code runs. This process can sometimes even be optimized based on which part of the code is run often.

Use cases and Examples

The V8 Javascript engine [↗] used in the Chrome browser [↗] and NodeJS runtime [↗] comes with a JIT compiler.

The .NET runtime also uses a JIT compiler, meaning all languages that run on it benefit from this implementation.

Summary

All in all, JIT compilers supercharge interpreters by giving them some of the advantages of compilers.

Here is another article you might like 😊 What Is A Key Value Pair?