Keyboard shortcuts

/ or ⌘/Ctrl K
Find a note
j / k
Next / previous section or linked note
h / l
Collapse or go to parent / expand or enter
e or Alt-click
Read a linked note here
o
Open focused note on its own
g g / G
First / last section or linked note
g h / g a
Home / all notes
g b / g t
Backlinks / table of contents
t
Cycle System, Light, Dark
? / Esc
Show / close this reference

Search: ↑/↓ or Ctrl N/P, Enter to open. Shortcuts pause while typing.

how jit compilers are implemented and fast: pypy, luajit, graal, and more [dfea4efc]

Tags: articles, jit

https://web.archive.org/web/20220430042047/carolchen.me/blog/jits-impls/

original (now dead link): carolchen.me/blog/jits-impls/

  • Interpreted languages still go down to bytecode
  • Function reuse happens, if you compile multiply(1,2), and then wrote multiply(2,3) then the already compiled version will be used

    • llvm bitcode can be seen
  • jits don't compile ahead of time, but still compiles source to machine code

    • not strictly about compiling code just-in-time, but compiling optimial code at an optimal time
  • how do we generate optimal code? not all assembly instructions are created equal

    • humans typically write better assemly than a computer
  • jits usually are more expensive but make up in optimized compiled code