ruby/yjit
Randy Stauner beafae9750
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>
2024-11-13 12:25:09 -05:00
..
bindgen YJIT: Specialize `String#[]` (`String#slice`) with fixnum arguments (#12069) 2024-11-13 12:25:09 -05:00
src YJIT: Specialize `String#[]` (`String#slice`) with fixnum arguments (#12069) 2024-11-13 12:25:09 -05:00
.gitignore
Cargo.lock Bump capstone from 0.11.0 to 0.12.0 in /yjit (#10094) 2024-02-25 19:02:00 -08:00
Cargo.toml YJIT: Tweak a comment a little [ci skip] 2024-07-18 13:03:17 -07:00
not_gmake.mk
yjit.mk Propagate jobserver FDs to `cargo` and `rustc` [ci skip] 2024-03-22 22:05:58 +09:00