summaryrefslogtreecommitdiff
path: root/benchmark
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2021-10-22 17:24:34 +0900
committerKoichi Sasada <ko1@atdot.net>2021-10-23 01:32:55 +0900
commitacb23454e57e1bbe828e7f3114430cab2d5db44c (patch)
treedc80f3a0f23c7e82ca595785320e6c8a0bd664b0 /benchmark
parent6b9285e8d45e88c5b014b8428520ffa2401789ad (diff)
allow to access ivars of classes/modules
if an ivar of a class/module refer to a shareable object, this ivar can be read from non-main Ractors.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/5006
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/vm_ivar_of_class.yml12
1 files changed, 12 insertions, 0 deletions
diff --git a/benchmark/vm_ivar_of_class.yml b/benchmark/vm_ivar_of_class.yml
new file mode 100644
index 0000000000..172e28b2fd
--- /dev/null
+++ b/benchmark/vm_ivar_of_class.yml
@@ -0,0 +1,12 @@
+prelude: |
+ class C
+ @a = 1
+ def self.a
+ _a = @a; _a = @a; _a = @a; _a = @a; _a = @a;
+ _a = @a; _a = @a; _a = @a; _a = @a; _a = @a;
+ end
+ end
+benchmark:
+ vm_ivar_of_class: |
+ a = C.a
+loop_count: 30000000