Sha256: 4bdf03412cde76fcc415283a2b9d55719966ca42b14ef833a787574a6ccef5b0
Contents?: true
Size: 295 Bytes
Versions: 77
Compression:
Stored size: 295 Bytes
Contents
#!/usr/bin/env ruby require "bundler" Bundler.require(:default) require "benchmark" ID_RANGE = -2**63..2**63-1 Benchmark.bm do |x| x.report("generate_id raw ") { 1_000_000.times { rand(-2**63..2**63-1) } } x.report("with fixed range ") { 1_000_000.times { rand(ID_RANGE) } } end
Version data entries
77 entries across 77 versions & 1 rubygems