diff options
author | Noah Gibbs <noah.gibbs@shopify.com> | 2021-10-01 16:45:03 +0100 |
---|---|---|
committer | Alan Wu <XrXr@users.noreply.github.com> | 2021-10-20 18:19:42 -0400 |
commit | d4a75dd9766c1f803687bf54f7b8886739b3e867 (patch) | |
tree | ff632bd8f01a6cb818d2b2325a724d86725d778b /README.md | |
parent | f911e264a1d539b6c99542d07f72af10ed91ae87 (diff) |
Add a YJIT hacking doc with some internals; change the README text a bit to reflect its current condition
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 18 |
1 files changed, 14 insertions, 4 deletions
@@ -8,11 +8,11 @@ YJIT - Yet Another Ruby JIT =========================== -**DISCLAIMER: Please note that this project is in early stages of development. It is very much a work in progress, it may cause your software to crash, and current performance results are likely to leave you feeling underwhelmed.** +**DISCLAIMER: Please note that this project is experimental. It is very much a work in progress, it may cause your software to crash, and current performance results will vary widely, especially on larger applications.** -YJIT is a lightweight, minimalistic Ruby JIT built inside the CRuby/MRI binary. +YJIT is a lightweight, minimalistic Ruby JIT built inside CRuby. It lazily compiles code using a Basic Block Versioning (BBV) architecture. The target use case is that of servers running -Ruby on Rails, an area where CRuby's MJIT has not yet managed to deliver speedups. +Ruby on Rails, an area where MJIT has not yet managed to deliver speedups. To simplify development, we currently support only macOS and Linux on x86-64, but an ARM64 backend is part of future plans. This project is open source and falls under the same license as CRuby. @@ -49,6 +49,16 @@ Because there is no GC for generated code yet, your software could run out of ex ## Installation +Current YJIT versions are installed by default with CRuby. Make sure to specify the "--yjit" command line option to enable it at runtime. + +Experimental YJIT patches that have not yet been merged with CRuby can be found in ruby-build: + +``` +ruby-build yjit-dev ~/.rubies/ruby-yjit-dev +``` + +They can also be found in the Shopify/yjit repository, which is cloned and build like CRuby. + Start by cloning the `Shopify/yjit` repository: ``` @@ -71,7 +81,7 @@ Typically configure will choose default C compiler. To specify the C compiler, u # Choosing a specific c compiler export CC=/path/to/my/choosen/c/compiler ``` -before runing `./configure`. +before running `./configure`. You can test that YJIT works correctly by running: |