I investigated how ZJIT could beat YJIT in some of the benchmarks where it's currently losing. I use this issue as a reminder to make sure we tackle them. They have PoC patches, but it's not meant to be upstreamed as is; it's only there to clarify the problem. Feel free to pick up anything from here.
micro
- throw
- Inline block calls and specialize
TAG_RETURN throw from a block. Return from the function, popping multiple frames as needed. (PoC)
- setivar_object, setivar_young
- GC fastpath for write barriers. (PoC)
- ruby-xor
- Inline
String#setbyte fastpath. (PoC)
- I haven't fully figured out what to do for "cached coderange" yet. Are there realistically no drawbacks? Should we profile, specialize, and recompile? Should the fastpath always have two branches? If we decide to just always clear it, it'd be also nice to lift it into HIR to deduplicate them.
- str_concat
- send_cfunc_block
other
- binarytrees
- graphql, graphql-native
The following things need more to catch up, but I haven't found enough for them yet:
- protoboeuf-encode
- Inline the fastpath for
String#<< with a codepoint. (PoC)
- IIRC Kevin shared his interest in porting one from YJIT this morning?
- erubi
- Inline
String#<< fastpath & some extension to it. (PoC)
- splay
- Specialize Float comparison operators (PoC)
- rubyboy
- Compile opt_case_dispatch. (PoC)
- Some reprofile for ivars. (PoC) I'll take a look at it as part of the function lifecycle effort.
- rack
headline
(many of them are still under investigation)
- mail
- rubocop
- List of patches.
- I guess we could compile
once as a fallback? The impact is small though.
- (ran out of time; will write up the rest later)
I investigated how ZJIT could beat YJIT in some of the benchmarks where it's currently losing. I use this issue as a reminder to make sure we tackle them. They have PoC patches, but it's not meant to be upstreamed as is; it's only there to clarify the problem. Feel free to pick up anything from here.
micro
TAG_RETURNthrow from a block. Return from the function, popping multiple frames as needed. (PoC)String#setbytefastpath. (PoC)String#<<fastpath. (PoC)String#setbytediscussion, I'm trying to lift codegen into HIR ZJIT: Compute the String#<< encoding check in HIR ruby/ruby#18251, but the patch is currently slower than master.other
The following things need more to catch up, but I haven't found enough for them yet:
String#<<with a codepoint. (PoC)String#<<fastpath & some extension to it. (PoC)headline
(many of them are still under investigation)
onceas a fallback? The impact is small though.