<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/ruby/test_optimization.rb, branch v3_2_11</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>merge revision(s) e1104017e3080fd432c0b5fdc3ae6e004ffd0834: [Backport #19781]</title>
<updated>2024-07-20T06:12:36+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2024-07-20T06:12:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2ac8e2049bad37da38576b1ed263713c66eba2c9'/>
<id>2ac8e2049bad37da38576b1ed263713c66eba2c9</id>
<content type='text'>
	YJIT: Fix cfp inconsistency on tailcall (#8107)

	[Bug #19781]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	YJIT: Fix cfp inconsistency on tailcall (#8107)

	[Bug #19781]
</pre>
</div>
</content>
</entry>
<entry>
<title>Use omit instead of skip: test/ruby/**/*.rb</title>
<updated>2022-01-04T08:25:30+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2022-01-04T08:25:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=47bf64a26d3d95a312ea5cf5d94ee1d2104f5e26'/>
<id>47bf64a26d3d95a312ea5cf5d94ee1d2104f5e26</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Prepare for removing RubyVM::JIT (#5262)</title>
<updated>2021-12-14T07:07:46+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2021-12-14T07:07:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1a63468831524f68e73cbb068071652c6486cfc6'/>
<id>1a63468831524f68e73cbb068071652c6486cfc6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Optimize dynamic string interpolation for symbol/true/false/nil/0-9</title>
<updated>2021-11-18T23:10:20+00:00</updated>
<author>
<name>Jeremy Evans</name>
<email>code@jeremyevans.net</email>
</author>
<published>2021-11-18T23:10:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b08dacfea39ad8da3f1fd7fdd0e4538cc892ec44'/>
<id>b08dacfea39ad8da3f1fd7fdd0e4538cc892ec44</id>
<content type='text'>
This provides a significant speedup for symbol, true, false,
nil, and 0-9, class/module, and a small speedup in most other cases.

Speedups (using included benchmarks):
:symbol        :: 60%
0-9            :: 50%
Class/Module   :: 50%
nil/true/false :: 20%
integer        :: 10%
[]             :: 10%
""             :: 3%

One reason this approach is faster is it reduces the number of
VM instructions for each interpolated value.

Initial idea, approach, and benchmarks from Eric Wong. I applied
the same approach against the master branch, updating it to handle
the significant internal changes since this was first proposed 4
years ago (such as CALL_INFO/CALL_CACHE -&gt; CALL_DATA). I also
expanded it to optimize true/false/nil/0-9/class/module, and added
handling of missing methods, refined methods, and RUBY_DEBUG.

This renames the tostring insn to anytostring, and adds an
objtostring insn that implements the optimization. This requires
making a few functions non-static, and adding some non-static
functions.

This disables 4 YJIT tests.  Those tests should be reenabled after
YJIT optimizes the new objtostring insn.

Implements [Feature #13715]

Co-authored-by: Eric Wong &lt;e@80x24.org&gt;
Co-authored-by: Alan Wu &lt;XrXr@users.noreply.github.com&gt;
Co-authored-by: Yusuke Endoh &lt;mame@ruby-lang.org&gt;
Co-authored-by: Koichi Sasada &lt;ko1@atdot.net&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This provides a significant speedup for symbol, true, false,
nil, and 0-9, class/module, and a small speedup in most other cases.

Speedups (using included benchmarks):
:symbol        :: 60%
0-9            :: 50%
Class/Module   :: 50%
nil/true/false :: 20%
integer        :: 10%
[]             :: 10%
""             :: 3%

One reason this approach is faster is it reduces the number of
VM instructions for each interpolated value.

Initial idea, approach, and benchmarks from Eric Wong. I applied
the same approach against the master branch, updating it to handle
the significant internal changes since this was first proposed 4
years ago (such as CALL_INFO/CALL_CACHE -&gt; CALL_DATA). I also
expanded it to optimize true/false/nil/0-9/class/module, and added
handling of missing methods, refined methods, and RUBY_DEBUG.

This renames the tostring insn to anytostring, and adds an
objtostring insn that implements the optimization. This requires
making a few functions non-static, and adding some non-static
functions.

This disables 4 YJIT tests.  Those tests should be reenabled after
YJIT optimizes the new objtostring insn.

Implements [Feature #13715]

Co-authored-by: Eric Wong &lt;e@80x24.org&gt;
Co-authored-by: Alan Wu &lt;XrXr@users.noreply.github.com&gt;
Co-authored-by: Yusuke Endoh &lt;mame@ruby-lang.org&gt;
Co-authored-by: Koichi Sasada &lt;ko1@atdot.net&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Make Array#min/max optimization respect refined methods</title>
<updated>2021-09-30T22:18:14+00:00</updated>
<author>
<name>Jeremy Evans</name>
<email>code@jeremyevans.net</email>
</author>
<published>2021-09-30T22:18:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1f5f8a187adb746b01cc95c3f29a0a355f513374'/>
<id>1f5f8a187adb746b01cc95c3f29a0a355f513374</id>
<content type='text'>
Pass in ec to vm_opt_newarray_{max,min}. Avoids having to
call GET_EC inside the functions, for better performance.

While here, add a test for Array#min/max being redefined to
test_optimization.rb.

Fixes [Bug #18180]</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pass in ec to vm_opt_newarray_{max,min}. Avoids having to
call GET_EC inside the functions, for better performance.

While here, add a test for Array#min/max being redefined to
test_optimization.rb.

Fixes [Bug #18180]</pre>
</div>
</content>
</entry>
<entry>
<title>Fix warnings in test_optimization.rb</title>
<updated>2021-08-24T15:34:48+00:00</updated>
<author>
<name>Jeremy Evans</name>
<email>code@jeremyevans.net</email>
</author>
<published>2021-08-24T15:34:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=14a9c364f75a9729d5a49e1fbea08fec2f813bdd'/>
<id>14a9c364f75a9729d5a49e1fbea08fec2f813bdd</id>
<content type='text'>
These were introduced in the test for tracing optimized methods
added in 48c8df9e0eb295af06d593ce37ce1933c0ee1d90.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These were introduced in the test for tracing optimized methods
added in 48c8df9e0eb295af06d593ce37ce1933c0ee1d90.
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow tracing of optimized methods</title>
<updated>2021-08-21T17:15:01+00:00</updated>
<author>
<name>Jeremy Evans</name>
<email>code@jeremyevans.net</email>
</author>
<published>2021-08-21T17:15:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=48c8df9e0eb295af06d593ce37ce1933c0ee1d90'/>
<id>48c8df9e0eb295af06d593ce37ce1933c0ee1d90</id>
<content type='text'>
This updates the trace instructions to directly dispatch to
opt_send_without_block.  So this should cause no slowdown in
non-trace mode.

To enable the tracing of the optimized methods, RUBY_EVENT_C_CALL
and RUBY_EVENT_C_RETURN are added as events to the specialized
instructions.

Fixes [Bug #14870]

Co-authored-by: Takashi Kokubun &lt;takashikkbn@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This updates the trace instructions to directly dispatch to
opt_send_without_block.  So this should cause no slowdown in
non-trace mode.

To enable the tracing of the optimized methods, RUBY_EVENT_C_CALL
and RUBY_EVENT_C_RETURN are added as events to the specialized
instructions.

Fixes [Bug #14870]

Co-authored-by: Takashi Kokubun &lt;takashikkbn@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Rename RubyVM::MJIT to RubyVM::JIT</title>
<updated>2021-01-14T06:46:51+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2021-01-14T06:36:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e1fee7f949cb6719122672fa1081c60984a5339f'/>
<id>e1fee7f949cb6719122672fa1081c60984a5339f</id>
<content type='text'>
because the name "MJIT" is an internal code name, it's inconsistent with
--jit while they are related to each other, and I want to discourage future
JIT implementation-specific (e.g. MJIT-specific) APIs by this rename.

[Feature #17490]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
because the name "MJIT" is an internal code name, it's inconsistent with
--jit while they are related to each other, and I want to discourage future
JIT implementation-specific (e.g. MJIT-specific) APIs by this rename.

[Feature #17490]
</pre>
</div>
</content>
</entry>
<entry>
<title>Guard all accesses to RubyVM::MJIT with defined?(RubyVM::MJIT) &amp;&amp;</title>
<updated>2020-12-04T15:45:54+00:00</updated>
<author>
<name>Benoit Daloze</name>
<email>eregontp@gmail.com</email>
</author>
<published>2020-12-04T15:40:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b4ec4a41c24105efbb43f9b70ca7f36d22f98294'/>
<id>b4ec4a41c24105efbb43f9b70ca7f36d22f98294</id>
<content type='text'>
* Otherwise those tests, etc cannot run on alternative Ruby implementations.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Otherwise those tests, etc cannot run on alternative Ruby implementations.
</pre>
</div>
</content>
</entry>
<entry>
<title>disable GC on a test</title>
<updated>2020-06-09T06:52:25+00:00</updated>
<author>
<name>Koichi Sasada</name>
<email>ko1@atdot.net</email>
</author>
<published>2020-06-09T06:52:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=195075e8f5f2220a0a1f00f5cfd2ad98681e71d5'/>
<id>195075e8f5f2220a0a1f00f5cfd2ad98681e71d5</id>
<content type='text'>
CI fails with GC while `foo{}`, so that disable GC for this script.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
CI fails with GC while `foo{}`, so that disable GC for this script.
</pre>
</div>
</content>
</entry>
</feed>
