1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
prelude: | class A @@foo = 1 def self.foo @@foo end ("A".."Z").each do |module_name| eval <<-EOM module #{module_name} end include #{module_name} EOM end end benchmark: vm_cvar: A.foo loop_count: 600000