diff options
| author | Randy Stauner <randy.stauner@shopify.com> | 2024-11-13 10:25:09 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-13 12:25:09 -0500 |
| commit | beafae97505f9def3967e958bb1f7bc7fd7b9a7a (patch) | |
| tree | 419507156e6f06ec6b2629d71a14d60a0da298d7 /test/ruby/test_thread_queue.rb | |
| parent | 202a377d215483fa6e4c52b210574720096d1593 (diff) | |
YJIT: Specialize `String#[]` (`String#slice`) with fixnum arguments (#12069)
* YJIT: Specialize `String#[]` (`String#slice`) with fixnum arguments
String#[] is in the top few C calls of several YJIT benchmarks:
liquid-compile rubocop mail sudoku
This speeds up these benchmarks by 1-2%.
* YJIT: Try harder to get type info for `String#[]`
In the large generated code of the mail gem the context doesn't have
the type info. In that case if we peek at the stack and add a guard
we can still apply the specialization
and it speeds up the mail benchmark by 5%.
Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>
Co-authored-by: Takashi Kokubun (k0kubun) <takashikkbn@gmail.com>
---------
Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>
Co-authored-by: Takashi Kokubun (k0kubun) <takashikkbn@gmail.com>
Notes
Notes:
Merged-By: maximecb <maximecb@ruby-lang.org>
Diffstat (limited to 'test/ruby/test_thread_queue.rb')
0 files changed, 0 insertions, 0 deletions
