summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorRandy Stauner <randy.stauner@shopify.com>2024-11-13 10:25:09 -0700
committerGitHub <noreply@github.com>2024-11-13 12:25:09 -0500
commitbeafae97505f9def3967e958bb1f7bc7fd7b9a7a (patch)
tree419507156e6f06ec6b2629d71a14d60a0da298d7 /test/ruby
parent202a377d215483fa6e4c52b210574720096d1593 (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')
0 files changed, 0 insertions, 0 deletions