[前][次][番号順一覧][スレッド一覧]

ruby-changes:56066

From: Takashi <ko1@a...>
Date: Mon, 10 Jun 2019 21:13:49 +0900 (JST)
Subject: [ruby-changes:56066] Takashi Kokubun: 973fd18f11 (trunk): Add a benchmark of irb boot time

https://git.ruby-lang.org/ruby.git/commit/?id=973fd18f11

From 973fd18f11f5026024fc43e2848db030110bdaee Mon Sep 17 00:00:00 2001
From: Takashi Kokubun <takashikkbn@g...>
Date: Mon, 10 Jun 2019 21:13:12 +0900
Subject: 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
```

diff --git a/benchmark/irb_exec.yml b/benchmark/irb_exec.yml
new file mode 100644
index 0000000..5575c00
--- /dev/null
+++ b/benchmark/irb_exec.yml
@@ -0,0 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/irb_exec.yml#L1
+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
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]