Sha256: 6a8a09f4f0874b6785ccb54abff17db8e94f64d00d82e7c54720b356c40fda2f
Contents?: true
Size: 401 Bytes
Versions: 8
Compression:
Stored size: 401 Bytes
Contents
Benchmark.ips do |x| %x{ var o = {} o[Symbol.for('foo')] = 123 o.foo = 123 var foo = Symbol('foo') o[foo] = 123 var a = 0, b = 0, c = 0 } x.report('global symbol') do `a += o[Symbol.for('foo')]` end x.report('symbol') do `a += o[foo]` end x.report('ident') do `b += o.foo` end x.report('string') do `c += o['foo']` end x.compare! end
Version data entries
8 entries across 8 versions & 1 rubygems