<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/ext/erb, branch ruby_3_2</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>[ruby/erb] Skip using the extension for truffleruby as well</title>
<updated>2022-11-27T06:30:48+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2022-11-27T06:30:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d2c62426e5f5a53fd17e07e789a92994be4351ed'/>
<id>d2c62426e5f5a53fd17e07e789a92994be4351ed</id>
<content type='text'>
(https://github.com/ruby/erb/pull/39)

* Skip using the extension for truffleruby as well

* Just skip building the C extension for TruffleRuby

* Skip rake compile for truffleruby

* Use resolve_feature_path

* Revert "Use resolve_feature_path"

This reverts commit https://github.com/ruby/erb/commit/acc1e0c0ffaf.

* Use resolve_feature_path with LoadError guard

https://github.com/ruby/erb/commit/85dcb08439
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(https://github.com/ruby/erb/pull/39)

* Skip using the extension for truffleruby as well

* Just skip building the C extension for TruffleRuby

* Skip rake compile for truffleruby

* Use resolve_feature_path

* Revert "Use resolve_feature_path"

This reverts commit https://github.com/ruby/erb/commit/acc1e0c0ffaf.

* Use resolve_feature_path with LoadError guard

https://github.com/ruby/erb/commit/85dcb08439
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/erb] Define ERB::Escape module</title>
<updated>2022-11-26T05:32:25+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2022-11-26T05:32:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=574896a0ce99ab00676aa5ff2fabd3dcf8d49154'/>
<id>574896a0ce99ab00676aa5ff2fabd3dcf8d49154</id>
<content type='text'>
(https://github.com/ruby/erb/pull/38)

Close #32</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(https://github.com/ruby/erb/pull/38)

Close #32</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/erb] Keep ERB::Util#html_escape private</title>
<updated>2022-11-25T08:54:18+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2022-11-25T08:53:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=addb1cbbfd93d30e4752ec63b2d5ff96a13fac3d'/>
<id>addb1cbbfd93d30e4752ec63b2d5ff96a13fac3d</id>
<content type='text'>
ERB::Util.html_escape has been public, but ERB::Util#html_escape had
been private.

https://github.com/ruby/erb/commit/e62210bf56
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ERB::Util.html_escape has been public, but ERB::Util#html_escape had
been private.

https://github.com/ruby/erb/commit/e62210bf56
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/erb] Rename erb.so to erb/escape.so</title>
<updated>2022-11-24T23:22:00+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2022-11-24T23:21:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c480f589c29c4e7f4414ee4b01513bf2bd2e0cbc'/>
<id>c480f589c29c4e7f4414ee4b01513bf2bd2e0cbc</id>
<content type='text'>
(https://github.com/ruby/erb/pull/35)

https://github.com/ruby/erb/commit/1280046952
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(https://github.com/ruby/erb/pull/35)

https://github.com/ruby/erb/commit/1280046952
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/erb] Revert the strpbrk optimization</title>
<updated>2022-11-05T08:34:32+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2022-11-05T08:30:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=9af344a42129ea193d6dba92d62458c5f3429507'/>
<id>9af344a42129ea193d6dba92d62458c5f3429507</id>
<content type='text'>
because it's much slower on M1 https://github.com/ruby/erb/pull/29.
It'd be too complicated to switch the implementation based on known
optimized platforms / versions.

Besides, short strings are the most common usages of this method and
SIMD doesn't really help that case. All in all, I can't justify the
existence of this code.

https://github.com/ruby/erb/commit/30691c8995
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
because it's much slower on M1 https://github.com/ruby/erb/pull/29.
It'd be too complicated to switch the implementation based on known
optimized platforms / versions.

Besides, short strings are the most common usages of this method and
SIMD doesn't really help that case. All in all, I can't justify the
existence of this code.

https://github.com/ruby/erb/commit/30691c8995
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/erb] Optimize away the rb_convert_type call using RB_TYPE_P</title>
<updated>2022-11-05T07:52:46+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2022-11-05T07:41:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=458d6fb15eedaa142c71f120e3a71b84d0938454'/>
<id>458d6fb15eedaa142c71f120e3a71b84d0938454</id>
<content type='text'>
https://github.com/ruby/erb/commit/12058c3784
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/erb/commit/12058c3784
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/erb] Use strpbrk only when str is long enough for SIMD</title>
<updated>2022-11-05T07:52:45+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2022-11-05T07:26:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e8873e01b67629f93ebbd83397f2454e16e0d864'/>
<id>e8873e01b67629f93ebbd83397f2454e16e0d864</id>
<content type='text'>
This is the same trick used by https://github.com/k0kubun/hescape to
choose the best strategy for different scenarios.

https://github.com/ruby/erb/commit/af26da2858
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is the same trick used by https://github.com/k0kubun/hescape to
choose the best strategy for different scenarios.

https://github.com/ruby/erb/commit/af26da2858
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/erb] Optimize the no-escape case with strpbrk</title>
<updated>2022-11-05T06:58:48+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2022-11-05T06:58:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=419d2fc14d2bedc6d5a7080ee80df8330884ea6c'/>
<id>419d2fc14d2bedc6d5a7080ee80df8330884ea6c</id>
<content type='text'>
(https://github.com/ruby/erb/pull/29)

Typically, strpbrk(3) is optimized pretty well with SIMD instructions.
Just using it makes this as fast as a SIMD-based implementation for the
no-escape case.

Not utilizing this for escaped cases because memory allocation would be
a more significant bottleneck for many strings anyway. Also, there'll be
some overhead in calling a C function (strpbrk) many times because we're
not using SIMD instructions directly. So using strpbrk all the time
might not necessarily be faster.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(https://github.com/ruby/erb/pull/29)

Typically, strpbrk(3) is optimized pretty well with SIMD instructions.
Just using it makes this as fast as a SIMD-based implementation for the
no-escape case.

Not utilizing this for escaped cases because memory allocation would be
a more significant bottleneck for many strings anyway. Also, there'll be
some overhead in calling a C function (strpbrk) many times because we're
not using SIMD instructions directly. So using strpbrk all the time
might not necessarily be faster.</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/erb] Avoid using prepend + super for fallback</title>
<updated>2022-11-04T16:46:29+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2022-11-04T16:46:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b169d78c882efdb4a3da6077f6d723f65ded6f15'/>
<id>b169d78c882efdb4a3da6077f6d723f65ded6f15</id>
<content type='text'>
(https://github.com/ruby/erb/pull/28)

`prepend` is prioritized more than ActiveSupport's monkey-patch, but the
monkey-patch needs to work.

https://github.com/ruby/erb/commit/611de5a865
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(https://github.com/ruby/erb/pull/28)

`prepend` is prioritized more than ActiveSupport's monkey-patch, but the
monkey-patch needs to work.

https://github.com/ruby/erb/commit/611de5a865
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/erb] Do not allocate a new String if not needed</title>
<updated>2022-11-04T07:07:24+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2022-11-04T06:34:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ccf32a5ca4ce29f9019cf8bae9f3c0f69e27bd22'/>
<id>ccf32a5ca4ce29f9019cf8bae9f3c0f69e27bd22</id>
<content type='text'>
[Feature #19102]https://github.com/ruby/erb/commit/ecebf8075c

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Feature #19102]https://github.com/ruby/erb/commit/ecebf8075c

</pre>
</div>
</content>
</entry>
</feed>
