Sha256: 591a3cdcfde2034c39b39718e3b03420537b40dc3cd3be75d78f6ff1132ae176

Contents?: true

Size: 423 Bytes

Versions: 2

Compression:

Stored size: 423 Bytes

Contents

require 'benchmark'
require File.dirname(__FILE__) + '/../harness'
require File.dirname(__FILE__) + '/../harness_cache'

LARGE_NUMBER = 20_000

Benchmark.bm do |b|
  b.report('get/set stash') do
    LARGE_NUMBER.times {|n|
      stash[:abcxyz123] = n
      stash[:abcxyz123]
    }
  end
  b.report('get/set cache') do
    LARGE_NUMBER.times {|n|
      Cache.set('abcxyz123', n)
      Cache.get('abcxyz123')
    }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
binary42-remix-stash-0.9.0 examples/bench.rb
binary42-remix-stash-0.9.1 examples/bench.rb