summaryrefslogtreecommitdiff
path: root/benchmark/nil_p.yml
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/nil_p.yml')
-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