Sha256: 4adacd19d3763a6535409b37276a721b9938a2d78432eaa52afe315ce5fb253c
Contents?: true
Size: 840 Bytes
Versions: 2
Compression:
Stored size: 840 Bytes
Contents
$:.unshift File.expand_path("../../lib", __FILE__) require 'benchmark' require 'daru' data = Daru::DataFrame.from_csv 'TradeoffData.csv' Benchmark.bm do |x| x.report("Single column grouping") do @single = data.group_by([:Treatment]) end x.report("Multi-column grouping") do @multi = data.group_by([:Group, :Treatment]) end x.report("Single mean") do @single.mean end x.report("Multi mean") do @multi.mean end end # ===== Benchmarks ===== # # user system total real # Single column grouping 0.000000 0.000000 0.000000 (0.000356) # Multi-column grouping 0.000000 0.000000 0.000000 (0.000958) # Single mean 0.000000 0.000000 0.000000 (0.000865) # Multi mean 0.000000 0.000000 0.000000 (0.002748)
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
daru-0.1.2 | benchmarks/group_by.rb |
daru-0.1.1 | benchmarks/group_by.rb |