<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/ruby.git/hash.c, branch ruby_3_2</title>
<subtitle>github.com: ruby/ruby.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby.git/'/>
<entry>
<title>Use FL_TEST_RAW in rb_hash_default_value</title>
<updated>2022-12-17T22:51:49+00:00</updated>
<author>
<name>John Hawthorn</name>
<email>john@hawthorn.email</email>
</author>
<published>2022-12-17T01:00:13+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby.git/commit/?id=ea3d3c455294b2ad94c93cbe0e61921d71f1d9d3'/>
<id>ea3d3c455294b2ad94c93cbe0e61921d71f1d9d3</id>
<content type='text'>
We should always have a T_HASH here, so we can use FL_TEST_RAW to avoid
checking whether we may have an immediate value.

I expect this to be a very small performance improvement (perf stat
./miniruby benchmark/hash_aref_miss.rb shows a ~1% improvement). It also
removes 9 instructions from rb_hash_default_value on x86_64.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We should always have a T_HASH here, so we can use FL_TEST_RAW to avoid
checking whether we may have an immediate value.

I expect this to be a very small performance improvement (perf stat
./miniruby benchmark/hash_aref_miss.rb shows a ~1% improvement). It also
removes 9 instructions from rb_hash_default_value on x86_64.
</pre>
</div>
</content>
</entry>
<entry>
<title>Use a BOP for Hash#default</title>
<updated>2022-12-17T22:51:49+00:00</updated>
<author>
<name>John Hawthorn</name>
<email>john@hawthorn.email</email>
</author>
<published>2022-12-15T18:46:24+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby.git/commit/?id=fbaa5db44a3b0622e2755fd00e0519a603aa9bcb'/>
<id>fbaa5db44a3b0622e2755fd00e0519a603aa9bcb</id>
<content type='text'>
On a hash miss we need to call default if it is redefined in order to
return the default value to be used. Previously we checked this with
rb_method_basic_definition_p, which avoids the method call but requires
a method lookup.

This commit replaces the previous check with BASIC_OP_UNREDEFINED_P and
a new BOP_DEFAULT. We still need to fall back to
rb_method_basic_definition_p when called on a subclasss of hash.

    |                |compare-ruby|built-ruby|
    |:---------------|-----------:|---------:|
    |hash_aref_miss  |       2.692|     3.531|
    |                |           -|     1.31x|

Co-authored-by: Daniel Colson &lt;danieljamescolson@gmail.com&gt;
Co-authored-by: "Ian C. Anderson" &lt;ian@iancanderson.com&gt;
Co-authored-by: Jack McCracken &lt;me@jackmc.xyz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On a hash miss we need to call default if it is redefined in order to
return the default value to be used. Previously we checked this with
rb_method_basic_definition_p, which avoids the method call but requires
a method lookup.

This commit replaces the previous check with BASIC_OP_UNREDEFINED_P and
a new BOP_DEFAULT. We still need to fall back to
rb_method_basic_definition_p when called on a subclasss of hash.

    |                |compare-ruby|built-ruby|
    |:---------------|-----------:|---------:|
    |hash_aref_miss  |       2.692|     3.531|
    |                |           -|     1.31x|

Co-authored-by: Daniel Colson &lt;danieljamescolson@gmail.com&gt;
Co-authored-by: "Ian C. Anderson" &lt;ian@iancanderson.com&gt;
Co-authored-by: Jack McCracken &lt;me@jackmc.xyz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Using UNDEF_P macro</title>
<updated>2022-11-16T09:58:33+00:00</updated>
<author>
<name>S-H-GAMELINKS</name>
<email>gamelinks007@gmail.com</email>
</author>
<published>2022-11-15T04:24:08+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby.git/commit/?id=1f4f6c9832d83e7ebd65ccf4e95cef358b3512c6'/>
<id>1f4f6c9832d83e7ebd65ccf4e95cef358b3512c6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Adjust indents [ci skip]</title>
<updated>2022-10-23T15:22:37+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-10-23T15:22:37+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby.git/commit/?id=c3e37f74aede27503fe1477cbd4bdde7d4df15da'/>
<id>c3e37f74aede27503fe1477cbd4bdde7d4df15da</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Introduce `hash_iter_status_check` function</title>
<updated>2022-10-23T07:17:24+00:00</updated>
<author>
<name>S.H</name>
<email>gamelinks007@gmail.com</email>
</author>
<published>2022-10-23T07:17:24+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby.git/commit/?id=c8c136265c6dd343990293016eb9904aa78a0412'/>
<id>c8c136265c6dd343990293016eb9904aa78a0412</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Improved formatting of `hash_foreach_iter` functions. (#6615)</title>
<updated>2022-10-22T10:34:00+00:00</updated>
<author>
<name>Samuel Williams</name>
<email>samuel.williams@oriontransfer.co.nz</email>
</author>
<published>2022-10-22T10:34:00+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby.git/commit/?id=8dfe3bdf48ff73052de1262e4644c08742abd8e6'/>
<id>8dfe3bdf48ff73052de1262e4644c08742abd8e6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[Bug #17767] Now `ENV.clone` raises `TypeError` as well as `ENV.dup`</title>
<updated>2022-08-02T07:40:12+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-07-20T10:19:23+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby.git/commit/?id=ec3f59309e3f08339c4c76a6881901580801d6cd'/>
<id>ec3f59309e3f08339c4c76a6881901580801d6cd</id>
<content type='text'>
One year ago, the former method has been deprecated while the latter
has become an error.  Then the 3.1 released, it is enough time to make
also the former an error.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
One year ago, the former method has been deprecated while the latter
has become an error.  Then the 3.1 released, it is enough time to make
also the former an error.
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename rb_ary_tmp_new to rb_ary_hidden_new</title>
<updated>2022-07-26T13:12:09+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2022-07-25T14:40:45+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby.git/commit/?id=efb91ff19b739b759f40af2673f942e80d212857'/>
<id>efb91ff19b739b759f40af2673f942e80d212857</id>
<content type='text'>
rb_ary_tmp_new suggests that the array is temporary in some way, but
that's not true, it just creates an array that's hidden and not on the
transient heap. This commit renames it to rb_ary_hidden_new.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
rb_ary_tmp_new suggests that the array is temporary in some way, but
that's not true, it just creates an array that's hidden and not on the
transient heap. This commit renames it to rb_ary_hidden_new.
</pre>
</div>
</content>
</entry>
<entry>
<title>Expand tabs [ci skip]</title>
<updated>2022-07-21T16:42:04+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2022-07-21T16:23:58+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby.git/commit/?id=5b21e94bebed90180d8ff63dad03b8b948361089'/>
<id>5b21e94bebed90180d8ff63dad03b8b948361089</id>
<content type='text'>
[Misc #18891]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Misc #18891]
</pre>
</div>
</content>
</entry>
<entry>
<title>ENV.merge! support multile arguments [Feature #18279]</title>
<updated>2022-06-16T16:22:24+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2021-12-03T14:13:27+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby.git/commit/?id=278fefb96294adf9d27a78f919c714a31b65ef58'/>
<id>278fefb96294adf9d27a78f919c714a31b65ef58</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
