You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: en/news/_posts/2018-02-24-ruby-2-6-0-preview1-released.md
+14-13Lines changed: 14 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -18,50 +18,51 @@ Ruby 2.6 introduces an initial implementation of JIT (Just-in-time) compiler.
18
18
19
19
JIT compiler aims to improve performance of any Ruby program execution.
20
20
Unlike ordinary JIT compilers for other languages, Ruby's JIT compiler does JIT compilation in a unique way, which prints C code to a disk and spawns common C compiler process to generate native code.
21
-
See also: https://github.com/vnmakarov/ruby/tree/rtl_mjit_branch#mjit-organization
21
+
See also: [Vladimir Makarov's mjit-organization branch](https://github.com/vnmakarov/ruby/tree/rtl_mjit_branch#mjit-organization).
22
22
23
-
How to use: Just specify "--jit" in command line or $RUBYOPT environment variable.
24
-
Specifying "--jit-verbose=1" allows to print basic information of ongoing JIT compilation. See "ruby --help" for other options.
23
+
How to use: Just specify `--jit` in command line or `$RUBYOPT` environment variable. Specifying `--jit-verbose=1` allows to print basic information of ongoing JIT compilation. See `ruby --help` for other options.
25
24
26
25
The main purpose of this JIT release is to provide a chance to check if it works for your platform and to find out security risks before the 2.6 release.
27
26
Currently JIT compiler is supported only when Ruby is built by gcc or clang and the compiler is available on runtime. Otherwise you can't use it for now.
28
27
29
-
As of 2.6.0-preview1, we're just preparing infrastructure for JIT and very few optimizations are implemented.
30
-
You can measure some of potential improvements in micro benchmarks with this release, but it is NOT ready for benchmarking final performance of Ruby's JIT compiler, especially for larger programs like Rails applications.
28
+
As of 2.6.0-preview1, we're just preparing infrastructure for JIT and very few optimizations are implemented. You can measure some of potential improvements in micro benchmarks with this release, but it is NOT ready for benchmarking final performance of Ruby's JIT compiler, especially for large programs like Rails applications.
31
29
32
30
We're going to implement method iniling in JIT compiler, which is expected to increase Ruby's performance in order of magnitude.
31
+
33
32
Also, we're planning to increase the supported platforms, and the next plan is to support Visual Studio.
34
33
35
34
Stay tuned for the new age of Ruby's performance.
36
35
37
36
## New Features
38
37
39
-
* Add Random.bytes. [Feature #4938]
38
+
* Add `Random.bytes`. [Feature #4938]
39
+
* Add `Binding#source_location`. [Feature #14230]
40
40
41
-
* Add Binding#source_location. [Feature #14230]
42
-
* This method returns the source location of binding, a 2-element array of `__FILE__` and `__LINE__`. Traditionally, the same information could be retrieved by `eval("[__FILE__, __LINE__]", binding)`, but we are planning to change this behavior so that `Kernel#eval` ignores binding's source location [Bug #4352]. So, users should use this newly-introduced method instead of `Kernel#eval`.
41
+
This method returns the source location of binding, a 2-element array of `__FILE__` and `__LINE__`. Traditionally, the same information could be retrieved by `eval("[__FILE__, __LINE__]", binding)`, but we are planning to change this behavior so that `Kernel#eval` ignores binding's source location [Bug #4352]. So, users should use this newly-introduced method instead of `Kernel#eval`.
43
42
44
-
* Add :exception option to let Kernel.#system raise error instead of returning false. [Feature #14386]
43
+
* Add `:exception` option to let `Kernel.#system` raise error instead of returning `false`. [Feature #14386]
45
44
46
45
## Performance improvements
47
46
48
47
* Speedup `Proc#call` because we dont' need to care about `$SAFE` any more.
49
48
[Feature #14318]
49
+
50
50
With `lc_fizzbuzz` benchmark which uses `Proc#call` so many times we can measure
51
51
x1.4 improvements [Bug #10212].
52
52
53
53
* Speedup `block.call` where `block` is passed block parameter. [Feature #14330]
0 commit comments