Sha256: c958ce684fd1bb0e2665fd13d065a501ae0e36c629d9fcdaa9a687db04bbbfb1

Contents?: true

Size: 794 Bytes

Versions: 10

Compression:

Stored size: 794 Bytes

Contents

# frozen_string_literal: true

require 'descriptive_statistics/safe'
require_relative 'base'

collection = []
1_000_000.times { collection << rand(1..99) }

puts '~~~ Baseline Summary Calculations ~~~'
puts
Benchmark.ips do |x|
  x.report('LS.13') do
    data = Lite::Statistics::Descriptive.new(collection)
    ls_baseline_summary(data)
  end

  x.report('DS.13') do
    data = DescriptiveStatistics::Stats.new(collection)
    data.descriptive_statistics
  end

  x.compare!
end

puts '~~~ Full Summary Calculations ~~~'
puts
Benchmark.ips do |x|
  x.report('LS.22') do
    data = Lite::Statistics::Descriptive.new(collection)
    data.sample_summary
  end

  x.report('DS.13') do
    data = DescriptiveStatistics::Stats.new(collection)
    data.descriptive_statistics
  end

  x.compare!
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
lite-statistics-2.0.0 benchmarks/descriptive_statistics.rb
lite-statistics-1.2.1 benchmarks/descriptive_statistics.rb
lite-statistics-1.2.0 benchmarks/descriptive_statistics.rb
lite-statistics-1.1.1 benchmarks/descriptive_statistics.rb
lite-statistics-1.1.0 benchmarks/descriptive_statistics.rb
lite-statistics-1.0.5 benchmarks/descriptive_statistics.rb
lite-statistics-1.0.4 benchmarks/descriptive_statistics.rb
lite-statistics-1.0.3 benchmarks/descriptive_statistics.rb
lite-statistics-1.0.2 benchmarks/descriptive_statistics.rb
lite-statistics-1.0.1 benchmarks/descriptive_statistics.rb