Sha256: 15386c9495513f84b4a1e17e3d7f5dd76ab48c6136b93db3897b4c2b2f017122
Contents?: true
Size: 347 Bytes
Versions: 6
Compression:
Stored size: 347 Bytes
Contents
require_relative "../../lib/nyara/nyara" # baseline is the raw loop def bench n t = Time.now n.times{ yield } cost = Time.now - t t = Time.now n.times{} baseline = Time.now - t cost - baseline end # custom baseline def bench_raw n t = Time.now n.times{ yield } Time.now - t end def dump data print Marshal.dump data end
Version data entries
6 entries across 6 versions & 1 rubygems