зеркало из https://github.com/github/ruby.git
Update README.md
Add section documenting command-line arguments
This commit is contained in:
Родитель
e5f8b41786
Коммит
ad601cef8a
13
README.md
13
README.md
|
@ -57,6 +57,8 @@ make -j16 test-all
|
|||
|
||||
## Usage
|
||||
|
||||
### Examples
|
||||
|
||||
Once YJIT is built, you can either use `./miniruby` from within your build directory, or switch to the YJIT version of `ruby`
|
||||
by using the `chruby` tool:
|
||||
|
||||
|
@ -73,6 +75,17 @@ You can dump statistics about compilation and execution by running YJIT with the
|
|||
|
||||
The machine code generated for a given method can be printed by adding `puts YJIT.disasm(method(:method_name))` to a Ruby script. Note that no code will be generated if the method is not compiled.
|
||||
|
||||
|
||||
### Options
|
||||
|
||||
YJIT supports all command-line options supported by upstream CRuby, but also adds a few YJIT-specific options:
|
||||
|
||||
- `--disable-yjit`: turn off YJIT (enabled by default)
|
||||
- `--yjit-stats`: produce statistics after the execution of a program (must compile with `cppflags=-DRUBY_DEBUG` to use this)
|
||||
- `--yjit-call-threshold=N`: number of calls after which YJIT begins to compile a function (default 2)
|
||||
- `--yjit-version-limit=N`: maximum number of versions to generate per basic block (default 4)
|
||||
- `--yjit-greedy-versioning`: greedy versioning mode (disabled by default, may increase code size)
|
||||
|
||||
## Benchmarking
|
||||
|
||||
We have collected a set of benchmarks and implemented a simple benchmarking harness in the [yjit-bench](https://github.com/Shopify/yjit-bench) repository. This benchmarking harness is designed to disable CPU frequency scaling, set process affinity and disable address space randomization so that the variance between benchmarking runs will be as small as possible. Please kindly note that we are at an early stage in this project.
|
||||
|
|
Загрузка…
Ссылка в новой задаче