1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Make sure to suppress .irbrc on benchmark

By the way, this is already improved by nobu:

```
$ benchmark-driver benchmark/irb_exec.yml --rbenv '2.6.3;2.7.0-preview1;before;after' -v
2.6.3: ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux]
2.7.0-preview1: ruby 2.7.0preview1 (2019-05-31 trunk c55db6aa27) [x86_64-linux]
before: ruby 2.7.0dev (2019-06-10T21:13:14+09:00 master 973fd18f11) [x86_64-linux]
after: ruby 2.7.0dev (2019-06-10T21:18:56+09:00 master 976c689ad4) [x86_64-linux]
Calculating -------------------------------------
                          2.6.3  2.7.0-preview1      before       after
            irb_exec     11.868           5.872       6.297      10.278 i/s -      30.000 times in 2.527776s 5.108997s 4.764167s 2.918821s

Comparison:
                         irb_exec
               2.6.3:        11.9 i/s
               after:        10.3 i/s - 1.15x  slower
              before:         6.3 i/s - 1.88x  slower
      2.7.0-preview1:         5.9 i/s - 2.02x  slower

```
This commit is contained in:
Takashi Kokubun 2019-06-10 22:04:51 +09:00
parent 880204cf55
commit caa90202c9
No known key found for this signature in database
GPG key ID: 6FFC433B12EE23DD

View file

@ -1,10 +1,10 @@
prelude: |
# frozen_string_literal: true
require 'rbconfig'
irb = File.join(File.dirname(RbConfig.ruby), 'irb')
irb_f = [File.join(File.dirname(RbConfig.ruby), 'irb'), '-f']
benchmark:
irb_exec: |
IO.popen(irb, 'w') do |io|
IO.popen(irb_f, 'w') do |io|
io.write('exit')
end
loop_count: 30