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

Add a benchmark of irb boot time

```
$ benchmark-driver benchmark/irb_exec.yml --rbenv '2.6.3;2.7.0-preview1'
Calculating -------------------------------------
                          2.6.3  2.7.0-preview1
            irb_exec     11.844           5.171 i/s -      30.000 times in 2.532887s 5.801960s

Comparison:
                         irb_exec
               2.6.3:        11.8 i/s
      2.7.0-preview1:         5.2 i/s - 2.29x  slower
```
This commit is contained in:
Takashi Kokubun 2019-06-10 21:13:12 +09:00
parent b9996b7b32
commit 973fd18f11
No known key found for this signature in database
GPG key ID: 6FFC433B12EE23DD

10
benchmark/irb_exec.yml Normal file
View file

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