Sha256: b47be2a42510afc13e927e71a54af8d57499f3f1f489096c47ecbc5ea27972f0
Contents?: true
Size: 446 Bytes
Versions: 3
Compression:
Stored size: 446 Bytes
Contents
require 'google_hash' require 'sane' require 'benchmark' sparse = false dense = false ruby = true if sparse a = GoogleHashSparseIntToInt.new p 'sparse' elsif dense p 'dense' a = GoogleHashDenseIntToInt.new else p 'ruby' a = [] end took = Benchmark.realtime { 200_00000.times {|i| a[i] = i} } p 'took', took.group_digits, OS.rss_bytes.group_digits, Benchmark.realtime { GC.start}.group_digits, ObjectSpace.count_objects
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
google_hash-0.8.2 | spec/bench_gc.rb |
google_hash-0.8.1 | spec/bench_gc.rb |
google_hash-0.8.0 | spec/bench_gc.rb |