Sha256: e10a6e26a6334b8575c4b73493a2d45a5d1c45e848dcbc330aa3664e01bd86a7
Contents?: true
Size: 691 Bytes
Versions: 4
Compression:
Stored size: 691 Bytes
Contents
require 'daru_lite' require 'benchmark' vector = DaruLite::Vector.new( (10**6).times.map.to_a.shuffle, missing_values: 100.times.map.to_a.shuffle ) vector = DaruLite::Vector.new( 10000.times.map.to_a.shuffle, missing_values: 100.times.map.to_a.shuffle, ) Benchmark.bm do |x| x.report("Mean of a vector") do vector.mean end x.report("Minimum of a vector") do vector.min end end # ===== Benchmarks ===== # # user system total real # Mean of a vector 0.130000 0.010000 0.140000 ( 0.145534) # Min of a vector 0.150000 0.000000 0.150000 ( 0.163623)
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
daru_lite-0.1.3 | benchmarks/statistics.rb |
daru_lite-0.1.2 | benchmarks/statistics.rb |
daru_lite-0.1.1 | benchmarks/statistics.rb |
daru_lite-0.1 | benchmarks/statistics.rb |