1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test/ruby
k0kubun 6c62356e5a _mjit_compile_send.erb: inline recursive call
mjit_compile.c: propagate funcname to compile_insn

test_jit.rb: add test covering this behavior

* Benchmark

```
require 'benchmark_driver'

Benchmark.driver(runner: :time, repeat_count: 4) do |x|
  x.prelude %{
    def fib(x)
      return x if x == 0 || x == 1
      fib(x-1) + fib(x-2)
    end
  }
  x.report 'fib(40)'
  x.loop_count 1

  x.rbenv(
    'before,--jit',
    'before',
    'after,--jit',
    'after',
  )
  x.verbose
end
```

```
before,--jit: ruby 2.6.0dev (2018-05-08 trunk 63349) +JIT [x86_64-linux]
before: ruby 2.6.0dev (2018-05-08 trunk 63349) [x86_64-linux]
after,--jit: ruby 2.6.0dev (2018-05-08 trunk 63349) +JIT [x86_64-linux]
last_commit=_mjit_compile_send.erb: inline recursive call
after: ruby 2.6.0dev (2018-05-08 trunk 63349) [x86_64-linux]
last_commit=_mjit_compile_send.erb: inline recursive call
Calculating -------------------------------------
                     before,--jit      before  after,--jit       after
             fib(40)        2.886       8.685        2.562       8.800 s -       1.000 times

Comparison:
                          fib(40)
         after,--jit:         2.6 s
        before,--jit:         2.9 s - 1.13x  slower
              before:         8.7 s - 3.39x  slower
               after:         8.8 s - 3.44x  slower

```

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-07 16:16:59 +00:00
..
enc
allpairs.rb
beginmainend.rb
bug-11928.rb
bug-13526.rb
lbtest.rb
marshaltestlib.rb marshaltestlib.rb: use clean object for exception 2018-04-12 03:40:16 +00:00
sentence.rb
test_alias.rb
test_argf.rb
test_arity.rb
test_array.rb Introduce endless range [Feature#12912] 2018-04-19 15:18:50 +00:00
test_assignment.rb Enable the assertions that had been disabled for historical reason 2018-04-17 08:26:20 +00:00
test_autoload.rb variable.c: fix thread + fork errors in autoload 2018-04-20 03:22:26 +00:00
test_backtrace.rb
test_basicinstructions.rb Remove the old disabled assertions for 1.8/1.9 2018-04-17 08:47:56 +00:00
test_beginendblock.rb
test_bignum.rb use Queue for inter-thread synchronization. 2018-04-04 05:00:52 +00:00
test_call.rb
test_case.rb
test_class.rb
test_clone.rb
test_comparable.rb
test_complex.rb Add exception: keyword in Kernel#Complex() 2018-03-15 07:19:48 +00:00
test_complex2.rb
test_complexrational.rb
test_condition.rb
test_const.rb
test_continuation.rb
test_defined.rb
test_dir.rb dir.c: warning for NUL 2018-04-19 07:05:39 +00:00
test_dir_m17n.rb
test_econv.rb
test_encoding.rb
test_enum.rb
test_enumerator.rb test_enumerator.rb: duplicate assertions 2018-03-13 02:43:04 +00:00
test_env.rb Add slice method to ENV like Hash#slice 2018-04-19 05:55:42 +00:00
test_eval.rb Remove the old disabled assertions for 1.8/1.9 2018-04-17 08:47:56 +00:00
test_exception.rb error.c: super in method_missing 2018-04-12 03:48:48 +00:00
test_fiber.rb test_fiber.rb: fix test_create_fiber_in_new_thread 2018-04-03 16:54:27 +00:00
test_file.rb file.c: realpath on special symlink 2018-02-28 05:43:53 +00:00
test_file_exhaustive.rb win32/file.c: relative path with drive letter 2018-03-28 07:01:48 +00:00
test_fixnum.rb
test_flip.rb
test_float.rb object.c: raise on long invalid float string 2018-05-04 06:12:12 +00:00
test_fnmatch.rb
test_gc.rb
test_hash.rb Add a new #filter alias for #select 2018-02-25 13:52:07 +00:00
test_ifunless.rb Rename test classes to allow stable test count when running test-all -j 2018-03-13 06:29:02 +00:00
test_integer.rb Add exception: keyword in Kernel#Integer() 2018-03-15 07:19:43 +00:00
test_integer_comb.rb
test_io.rb Remove needless require [ci skip] 2018-05-07 15:08:46 +00:00
test_io_m17n.rb trick ruby-mode.el by heredocs 2018-01-31 04:02:17 +00:00
test_iseq.rb compile.c: align range 2018-04-16 12:46:08 +00:00
test_iterator.rb
test_jit.rb _mjit_compile_send.erb: inline recursive call 2018-05-07 16:16:59 +00:00
test_key_error.rb
test_keyword.rb assertions for r62914 2018-03-25 14:06:06 +00:00
test_lambda.rb
test_lazy_enumerator.rb Bug Fix Enumerator::Lazy#uniq state for multiple call 2018-03-13 01:00:08 +00:00
test_literal.rb parse.y: extra error message after no digits 2018-04-09 11:09:30 +00:00
test_m17n.rb string.c: fix dumped suffix 2018-04-16 07:12:06 +00:00
test_m17n_comb.rb
test_marshal.rb
test_math.rb
test_metaclass.rb
test_method.rb proc.c: fix segfault when no singleton class 2018-04-03 06:57:44 +00:00
test_mixed_unicode_escapes.rb
test_module.rb Remove the disabled old tests for Ruby 1.8/1.9 feature change 2018-04-17 08:18:58 +00:00
test_not.rb Rename test classes to allow stable test count when running test-all -j 2018-03-13 06:29:02 +00:00
test_notimp.rb
test_numeric.rb test_numeric.rb: loose precision assertion 2018-04-26 00:12:35 +00:00
test_object.rb
test_objectspace.rb
test_optimization.rb compile.c: fix unconditional branch optimization 2018-04-25 06:45:05 +00:00
test_pack.rb pack.c: fix underflow 2018-03-28 10:12:17 +00:00
test_parse.rb parse.y: fix cmdarg in command_args 2018-04-17 01:22:26 +00:00
test_path.rb
test_pipe.rb win32.c: EPIPE for ERROR_NO_DATA 2018-02-01 02:56:28 +00:00
test_primitive.rb
test_proc.rb
test_process.rb test_process.rb: assert minimum maxgroups 2018-02-22 01:58:29 +00:00
test_rand.rb random.c: Random.bytes 2018-02-20 09:26:38 +00:00
test_range.rb range.c: each on endless range 2018-04-28 07:31:32 +00:00
test_rational.rb bignum.c: Bignum#fdiv avoids double division when divisor is bignum 2018-04-04 14:02:59 +00:00
test_rational2.rb
test_readpartial.rb
test_refinement.rb
test_regexp.rb re.c: do not escape terminator in Regexp.union 2018-03-16 13:37:44 +00:00
test_require.rb
test_rubyoptions.rb test_rubyoptions.rb: let all tests work with --jit 2018-04-28 09:11:25 +00:00
test_rubyvm.rb
test_settracefunc.rb The test for TracePoint with thread had never worked correctly 2018-04-17 08:47:58 +00:00
test_signal.rb signal.c: refine error messages 2018-03-10 11:26:54 +00:00
test_sleep.rb
test_sprintf.rb
test_sprintf_comb.rb
test_string.rb string.c: fix scanned substring with \K 2018-04-24 12:25:46 +00:00
test_stringchar.rb
test_struct.rb
test_super.rb test/ruby/test_super.rb: Remove unused assertions 2018-04-17 08:52:25 +00:00
test_symbol.rb
test_syntax.rb parse.y: terminator at continued line 2018-03-21 12:40:16 +00:00
test_system.rb process.c: command_name encoding 2018-02-03 03:50:28 +00:00
test_thread.rb thread.c: reset waitq of keeping mutexes in child 2018-03-05 22:58:13 +00:00
test_threadgroup.rb
test_time.rb skip a test if another Thread is running. 2018-02-28 07:31:49 +00:00
test_time_tz.rb test_time_tz.rb: Lisbon tzdata fix 2018-04-01 13:16:14 +00:00
test_trace.rb
test_transcode.rb
test_undef.rb
test_unicode_escape.rb
test_variable.rb
test_vm_dump.rb
test_weakmap.rb test_weakmap.rb: skip unstable assertion 2018-03-16 14:12:39 +00:00
test_whileuntil.rb
test_yield.rb
ut_eof.rb