summaryrefslogtreecommitdiff
path: root/benchmark
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2019-08-02 23:25:38 +0900
committerYusuke Endoh <mame@ruby-lang.org>2019-08-02 23:25:38 +0900
commit086ffe72c711179c30a773027e0b4113e908d399 (patch)
tree1ed14b8037dfe0f60d858ec5a1fa019bd1e592dc /benchmark
parente9e17cbc051e894dfd27eda5feca2939f65552db (diff)
Revert "Revert "Add a specialized instruction for `.nil?` calls""
This reverts commit a0980f2446c0db735b8ffeb37e241370c458a626. Retry for macOS Mojave.
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/nil_p.yml9
1 files changed, 9 insertions, 0 deletions
diff --git a/benchmark/nil_p.yml b/benchmark/nil_p.yml
new file mode 100644
index 0000000000..79ba4f2177
--- /dev/null
+++ b/benchmark/nil_p.yml
@@ -0,0 +1,9 @@
+prelude: |
+ class Niller; def nil?; true; end; end
+ xnil, notnil = nil, Object.new
+ niller = Niller.new
+benchmark:
+ - xnil.nil?
+ - notnil.nil?
+ - niller.nil?
+loop_count: 10000000