1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test
k0kubun fb80f6c7ba insns.def: optimize & and | of Integer [experimental]
not optimizing Array#& and Array#| because vm_insnhelper.c can't easily
inline it (large amount of array.c code would be needed in vm_insnhelper.c)
and the method body is a little complicated compared to Integer's ones.
So I thought only Integer#& and Integer#| have a significant impact,
and eliminating unnecessary branches would contribute to JIT's performance.

vm_insnhelper.c: ditto

tool/transform_mjit_header.rb: make sure these instructions are inlined
on JIT.

compile.c: compile vm_opt_and and vm_opt_or.
id.def: define id for them to be used in compile.c and vm*.c
vm.c: track redefinition of Integer#& and Integer#|
vm_core.h: allow detecting redefinition of & and |

test/ruby/test_jit.rb: test new insns
test/ruby/test_optimization.rb: ditto

* Optcarrot benchmark

This is a kind of experimental thing but I'm committing this since the
performance impact is significant especially on Optcarrot with JIT.

$ benchmark-driver benchmark.yml --rbenv 'before::before --disable-gems;before+JIT::before --disable-gems --jit;after::after --disable-gems;after+JIT::after --disable-gems --jit' -v --repeat-count 24
before: ruby 2.6.0dev (2018-09-24 trunk 64821) [x86_64-linux]
before+JIT: ruby 2.6.0dev (2018-09-24 trunk 64821) +JIT [x86_64-linux]
after: ruby 2.6.0dev (2018-09-24 opt_and 64821) [x86_64-linux]
last_commit=opt_or
after+JIT: ruby 2.6.0dev (2018-09-24 opt_and 64821) +JIT [x86_64-linux]
last_commit=opt_or
Calculating -------------------------------------
                             before  before+JIT       after   after+JIT
Optcarrot Lan_Master.nes     51.460      66.315      53.023      71.173 fps

Comparison:
             Optcarrot Lan_Master.nes
               after+JIT:        71.2 fps
              before+JIT:        66.3 fps - 1.07x  slower
                   after:        53.0 fps - 1.34x  slower
                  before:        51.5 fps - 1.38x  slower

[close https://github.com/ruby/ruby/pull/1963]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-24 12:40:28 +00:00
..
-ext- * remove trailing spaces. 2018-09-21 06:41:09 +00:00
base64
benchmark
bigdecimal
cgi Revert "ext/cgi/escape: preserve String subclass in result" 2018-05-03 01:24:09 +00:00
coverage compile.c: remove tracecoverage instruction for line coverage 2018-08-22 11:09:47 +00:00
csv Merge csv-3.0.0 from ruby/csv repository. 2018-09-05 13:33:21 +00:00
date Support old versions of Ruby with FrozenError. 2018-08-07 12:47:11 +00:00
dbm Support old versions of Ruby with FrozenError. 2018-08-07 12:47:11 +00:00
digest
drb
dtrace test/dtrace/helper.rb: support systemtap in dtrace tests 2018-06-05 21:19:50 +00:00
erb Rename test classes to allow stable test count when running test-all -j 2018-03-13 06:29:02 +00:00
etc
excludes
fiddle test_function.rb: try running test_nogvl_poll again 2018-08-18 02:15:41 +00:00
fileutils Retry to merge fileutils-1.1.0. 2018-05-15 05:53:18 +00:00
gdbm Support old versions of Ruby with FrozenError. 2018-08-07 12:47:11 +00:00
io test/io/wait/test_io_wait_uncommon.rb: relax /dev/random check 2018-08-25 22:32:35 +00:00
irb Suppress read of ~/.irbrc 2018-08-18 04:09:48 +00:00
json
lib Propagate subprocess timeout scale option to worker processes 2018-09-16 14:32:30 +00:00
logger Remove unused variables 2018-03-17 06:41:35 +00:00
matrix lib/matrix: Fix potential bug of Vector#angle_with 2018-09-16 04:18:50 +00:00
minitest use https:// instead of http:// 2018-07-28 10:00:27 +00:00
misc
mkmf
monitor
net test/net/imap/test_imap.rb (test_exception_during_idle): kill infinite looper 2018-08-16 03:37:14 +00:00
nkf
objspace
open-uri
openssl openssl: sync with upstream repository 2018-08-08 14:13:53 +00:00
optparse optparse: Suppress warnings 2018-05-06 09:53:33 +00:00
ostruct Support old versions of Ruby with FrozenError. 2018-08-07 12:47:11 +00:00
pathname
psych Merge psych-3.1.0.pre1. 2018-08-27 00:44:04 +00:00
rdoc * remove trailing spaces. 2018-08-27 01:30:20 +00:00
readline Readline: expose rl_completion_quote_character variable 2018-09-02 23:27:08 +00:00
resolv
rexml rexml: disable XPath 1.0 compatible "#{ELEMENT_NAME}" processing by default 2018-04-28 01:36:18 +00:00
rinda Skip EHOSTUNREACH by host issues 2018-09-18 12:55:05 +00:00
ripper test/ripper/test_parser_events.rb (test_block_variables): bump RLIMIT_AS again 2018-08-15 18:56:34 +00:00
rss rss: Add option Hash support to RSS::Parser.parse 2018-05-12 09:06:00 +00:00
ruby insns.def: optimize & and | of Integer [experimental] 2018-09-24 12:40:28 +00:00
rubygems revert r64817: kernel_warn.rb: skip kernel_require.rb 2018-09-24 07:46:07 +00:00
scanf
sdbm
shell Promote Shell library to default gems. 2018-07-20 02:24:59 +00:00
socket test/socket/test_socket.rb (timestamp_retry_rw): IO.select before recvmsg 2018-08-20 20:45:40 +00:00
stringio Support old versions of Ruby with FrozenError. 2018-08-07 12:47:11 +00:00
strscan
syslog
testunit Use &. instead of modifier if 2018-06-10 03:10:13 +00:00
uri http_proxy setting should respect both parent domain and subdomain 2018-05-17 07:40:01 +00:00
webrick webrick: raise EOFError in parse when read line is nil 2018-09-24 07:48:33 +00:00
win32ole Rename test classes to allow stable test count when running test-all -j 2018-03-13 06:29:02 +00:00
yaml
zlib test/zlib/test_zlib.rb (test_path): enable the accidentally-disabled assertion 2018-04-17 06:38:08 +00:00
colors
runner.rb
test_abbrev.rb
test_cmath.rb Add test for coverage. 2018-08-07 09:52:53 +00:00
test_delegate.rb
test_extlibs.rb
test_find.rb
test_forwardable.rb
test_ipaddr.rb
test_mutex_m.rb
test_observer.rb
test_open3.rb Remove needless closed? 2018-06-17 15:42:35 +00:00
test_pp.rb
test_prettyprint.rb
test_prime.rb test/test_prime.rb: add testcases of prime library 2018-06-24 09:31:06 +00:00
test_pstore.rb
test_pty.rb Remove needless lines 2018-06-12 14:36:32 +00:00
test_rbconfig.rb
test_securerandom.rb
test_set.rb
test_shellwords.rb
test_singleton.rb
test_sync.rb Move obsoleted test/thread/test_*.rb with the current implementation. 2018-07-31 03:49:38 +00:00
test_syslog.rb
test_tempfile.rb Failed to unlink before close on mswin 2018-07-11 13:00:56 +00:00
test_time.rb time.rb: yday support 2018-07-24 07:47:01 +00:00
test_timeout.rb
test_tmpdir.rb test/test_{tempfile,tmpdir}: get rid of leftover files 2018-07-11 08:33:37 +00:00
test_tracer.rb
test_tsort.rb
test_unicode_normalize.rb fix range check for Hangul jamo trailers in Unicode normalization 2018-07-28 09:44:33 +00:00
test_weakref.rb
test_win32api.rb test_win32api.rb: suppress a warning 2018-09-23 12:40:46 +00:00