ruby/bootstraptest
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
..
pending.rb Moved already resolved test 2020-04-27 10:39:07 +09:00
runner.rb Rename a variable name 2024-07-19 16:39:21 +09:00
test_attr.rb Revert "Revert "This commit implements the Object Shapes technique in CRuby."" 2022-10-11 08:40:56 -07:00
test_autoload.rb Use `File.write` instead of `Kernel#open` 2024-07-09 13:01:44 +09:00
test_block.rb vm_insnhelper.c: break from nested rescue 2015-01-23 14:57:08 +00:00
test_class.rb vm.c: initialize defined_module_hash early 2013-10-13 11:59:27 +00:00
test_constant_cache.rb Finer-grained constant cache invalidation (take 2) 2022-04-01 14:48:22 -04:00
test_env.rb fallback env encoding to ASCII-8BIT 2018-09-26 17:24:00 +00:00
test_eval.rb Raise a compile error for break/next/redo inside eval in cases where it is optimized away 2024-09-18 16:54:56 -07:00
test_exception.rb Do not include a backtick in error messages and backtraces 2024-02-15 18:42:31 +09:00
test_fiber.rb support concurrent btest execution 2022-02-06 03:05:47 +09:00
test_finalizer.rb Test finalizer is ran in bootstraptest 2024-04-01 10:26:16 -04:00
test_flip.rb * bootstraptest/test_flip.rb: new test for flip-flop operator. 2007-07-10 06:57:56 +00:00
test_flow.rb Ensure test suite is compatible with --frozen-string-literal 2024-03-14 17:56:15 +01:00
test_fork.rb Re-initialize vm->ractor.sched.lock after fork 2024-08-13 11:52:24 -07:00
test_gc.rb RJIT: Streamline RJIT enablement check 2023-12-21 14:32:03 -08:00
test_insns.rb Expand opt_newarray_send to support Array#pack with buffer keyword arg 2024-07-29 16:26:58 -04:00
test_io.rb Use `File.write` instead of `Kernel#open` 2024-07-09 13:01:44 +09:00
test_jump.rb Ensure test suite is compatible with --frozen-string-literal 2024-03-14 17:56:15 +01:00
test_literal.rb Update bootstraptest test for colon-style hash inspect 2024-10-03 18:47:09 +09:00
test_literal_suffix.rb [PRISM] Enhance syntax error message extraction in test_literal_suffix btest 2024-04-03 17:34:12 -04:00
test_load.rb Use `File.write` instead of `Kernel#open` 2024-07-09 13:01:44 +09:00
test_marshal.rb bootstraptest/test_marshal.rb: test updated 2008-03-01 04:07:26 +00:00
test_massign.rb * insns.def (expandarray): fix stack inc. 2008-01-23 17:17:23 +00:00
test_method.rb Remove "simple" flag from forwarded ICs 2024-10-15 19:06:07 -07:00
test_objectspace.rb Use a monotonically increasing number for object_id 2019-11-07 09:31:07 -08:00
test_proc.rb Make proc/Proc.new without block an error instead of warning 2020-06-10 17:49:54 -07:00
test_ractor.rb skip `SystemStackError` 2024-11-08 18:02:46 +09:00
test_rjit.rb RJIT: Fixed and/or reg+disp32 operations (#10856) 2024-06-13 15:55:01 -07:00
test_string.rb * string.c (str_discard): does not free for STR_NOFREE string. 2015-02-13 13:06:58 +00:00
test_struct.rb * bootstraptest/test_struct.rb: some test moved from test to shut 2008-03-13 16:40:33 +00:00
test_syntax.rb Skip flaky RJIT tests 2024-06-03 16:50:43 -07:00
test_thread.rb Use `File.write` instead of `Kernel#open` 2024-07-09 13:01:44 +09:00
test_yjit.rb YJIT: Specialize `String#[]` (`String#slice`) with fixnum arguments (#12069) 2024-11-13 12:25:09 -05:00
test_yjit_30k_ifelse.rb * append newline at EOF. [ci skip] 2021-10-21 08:12:53 +09:00
test_yjit_30k_methods.rb * append newline at EOF. [ci skip] 2021-10-21 08:12:53 +09:00
test_yjit_rust_port.rb Rust YJIT 2022-04-27 11:00:22 -04:00