summaryrefslogtreecommitdiff
path: root/benchmark/hash_ident_obj.yml
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/hash_ident_obj.yml')
-rw-r--r--benchmark/hash_ident_obj.yml7
1 files changed, 7 insertions, 0 deletions
diff --git a/benchmark/hash_ident_obj.yml b/benchmark/hash_ident_obj.yml
new file mode 100644
index 0000000..95c3109
--- /dev/null
+++ b/benchmark/hash_ident_obj.yml
@@ -0,0 +1,7 @@
+benchmark:
+ hash_ident_obj: |
+ h = {}.compare_by_identity
+ objs = 26.times.map { Object.new }
+ objs.each { |o| h[o] = o }
+ 200_000.times { objs.each { |o| h[o] } }
+loop_count: 1