mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
caa90202c9
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 trunkc55db6aa27
) [x86_64-linux] before: ruby 2.7.0dev (2019-06-10T21:13:14+09:00 master973fd18f11
) [x86_64-linux] after: ruby 2.7.0dev (2019-06-10T21:18:56+09:00 master976c689ad4
) [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 ```
10 lines
232 B
YAML
10 lines
232 B
YAML
prelude: |
|
|
# frozen_string_literal: true
|
|
require 'rbconfig'
|
|
irb_f = [File.join(File.dirname(RbConfig.ruby), 'irb'), '-f']
|
|
benchmark:
|
|
irb_exec: |
|
|
IO.popen(irb_f, 'w') do |io|
|
|
io.write('exit')
|
|
end
|
|
loop_count: 30
|