<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/enum.c, branch v3_4_9</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Fix too early writebarrier in tally_up</title>
<updated>2025-09-05T16:05:06+00:00</updated>
<author>
<name>John Hawthorn</name>
<email>john@hawthorn.email</email>
</author>
<published>2025-06-15T08:18:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ff124e9f93975e40ae91cff272a1c1d05273e615'/>
<id>ff124e9f93975e40ae91cff272a1c1d05273e615</id>
<content type='text'>
After returning from the callback in st_update is the point that the
hash table may be resized, which could trigger a GC and mark the table
being used for the tally.

    RUBY_GC_LIBRARY=wbcheck WBCHECK_VERIFY_AFTER_WB=1 ./miniruby -e '(0...100).map(&amp;:to_s).tally'
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After returning from the callback in st_update is the point that the
hash table may be resized, which could trigger a GC and mark the table
being used for the tally.

    RUBY_GC_LIBRARY=wbcheck WBCHECK_VERIFY_AFTER_WB=1 ./miniruby -e '(0...100).map(&amp;:to_s).tally'
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) b176d4f52e4af67654814dab3e9c5f4bf9170e54: [Backport #21008]</title>
<updated>2025-02-14T02:01:42+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2025-02-14T02:01:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=bc359b9971088ff921e26346f395c70640654e9e'/>
<id>bc359b9971088ff921e26346f395c70640654e9e</id>
<content type='text'>
	[Bug #21008] Normalize before sum to float

	After switching to `Float`-mode when summing `Numeric` objects,
	normalization for `Float` is still needed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[Bug #21008] Normalize before sum to float

	After switching to `Float`-mode when summing `Numeric` objects,
	normalization for `Float` is still needed.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove 1 allocation in Enumerable#each_with_index (#11868)</title>
<updated>2024-10-11T14:22:44+00:00</updated>
<author>
<name>Alan Wu</name>
<email>XrXr@users.noreply.github.com</email>
</author>
<published>2024-10-11T14:22:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=11e7ab79deb5935573d15ba4f33fc41e5c2b7522'/>
<id>11e7ab79deb5935573d15ba4f33fc41e5c2b7522</id>
<content type='text'>
* Remove 1 allocation in Enumerable#each_with_index

Previously, each call to Enumerable#each_with_index allocates 2
objects, one for the counting index, the other an imemo_ifunc passed
to `self.each` as a block.

Use `struct vm_ifunc::data` to hold the counting index directly to
remove 1 allocation.

* [DOC] Brief summary for usages of `struct vm_ifunc`</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Remove 1 allocation in Enumerable#each_with_index

Previously, each call to Enumerable#each_with_index allocates 2
objects, one for the counting index, the other an imemo_ifunc passed
to `self.each` as a block.

Use `struct vm_ifunc::data` to hold the counting index directly to
remove 1 allocation.

* [DOC] Brief summary for usages of `struct vm_ifunc`</pre>
</div>
</content>
</entry>
<entry>
<title>[DOC] Mention that Enumerable#each_with_index calls self.each</title>
<updated>2024-10-10T16:32:47+00:00</updated>
<author>
<name>Alan Wu</name>
<email>alanwu@ruby-lang.org</email>
</author>
<published>2024-10-10T16:20:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5f3e9f185d354f17ba50510659fb3a766104e153'/>
<id>5f3e9f185d354f17ba50510659fb3a766104e153</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[DOC] Add pound sign before all &lt;=&gt; methods</title>
<updated>2024-10-03T13:28:13+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2024-10-02T17:55:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f56be4286f70734ead11b316b85f504ca5b6c6dc'/>
<id>f56be4286f70734ead11b316b85f504ca5b6c6dc</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[DOC] Rationalize aliases in What's Here</title>
<updated>2024-08-31T02:26:50+00:00</updated>
<author>
<name>BurdetteLamar</name>
<email>burdettelamar@yahoo.com</email>
</author>
<published>2024-08-30T20:30:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f1a7966187886e5b62e22126bd7e83fb005973a2'/>
<id>f1a7966187886e5b62e22126bd7e83fb005973a2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[DOC] Tweaks for Enum#tally</title>
<updated>2024-08-21T19:56:59+00:00</updated>
<author>
<name>BurdetteLamar</name>
<email>burdettelamar@yahoo.com</email>
</author>
<published>2024-08-17T18:18:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=76ccd1df3777312f865f83d5fd945b18140ecb48'/>
<id>76ccd1df3777312f865f83d5fd945b18140ecb48</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Enumerable#all?: Stop optimizing when a given block is not optimizable</title>
<updated>2024-07-11T03:28:23+00:00</updated>
<author>
<name>Yusuke Endoh</name>
<email>mame@ruby-lang.org</email>
</author>
<published>2024-07-11T02:46:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e1238a1faba5cbb7975d08963bf0bfa50a96d2b0'/>
<id>e1238a1faba5cbb7975d08963bf0bfa50a96d2b0</id>
<content type='text'>
This is a follow up to 182822683f86c8f8d63b05765addf5a04d112aa2.

Co-Authored-By: Aaron Patterson &lt;tenderlove@ruby-lang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a follow up to 182822683f86c8f8d63b05765addf5a04d112aa2.

Co-Authored-By: Aaron Patterson &lt;tenderlove@ruby-lang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Use rb_block_call2 for some Enumerable methods</title>
<updated>2024-07-10T04:00:47+00:00</updated>
<author>
<name>Yusuke Endoh</name>
<email>mame@ruby-lang.org</email>
</author>
<published>2024-07-09T09:30:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=182822683f86c8f8d63b05765addf5a04d112aa2'/>
<id>182822683f86c8f8d63b05765addf5a04d112aa2</id>
<content type='text'>
Enumerable#all?, #any?, #one?, and #none? do not use yielded arguments
as an Array. So they can use rb_block_call2 to omit array allocatoin.

Enumerable#find does not have to immediately accept yielded arguments as
an Array. It can delay array allocation until the predicate block
returns truthy.

(TODO: Enumerable#count and #find_all seem to be optimizable as well.)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Enumerable#all?, #any?, #one?, and #none? do not use yielded arguments
as an Array. So they can use rb_block_call2 to omit array allocatoin.

Enumerable#find does not have to immediately accept yielded arguments as
an Array. It can delay array allocation until the predicate block
returns truthy.

(TODO: Enumerable#count and #find_all seem to be optimizable as well.)
</pre>
</div>
</content>
</entry>
<entry>
<title>[DOC] rewrite inject doc (#10009)</title>
<updated>2024-05-06T04:51:44+00:00</updated>
<author>
<name>Dave Thomas</name>
<email>dave@pragdave.me</email>
</author>
<published>2024-05-06T04:51:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a5cb8c8c5ba61a82c950843c57679fc135762b07'/>
<id>a5cb8c8c5ba61a82c950843c57679fc135762b07</id>
<content type='text'>
Co-authored-by: Nobuyoshi Nakada &lt;nobu@ruby-lang.org&gt;
Co-authored-by: Dennis Dashkevich &lt;dskecse@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: Nobuyoshi Nakada &lt;nobu@ruby-lang.org&gt;
Co-authored-by: Dennis Dashkevich &lt;dskecse@gmail.com&gt;</pre>
</div>
</content>
</entry>
</feed>
