Sha256: cc6e85e9bbc8abaf1b1a179d15250ada910638fb943a3fd12bfe668d34479d8c
Contents?: true
Size: 381 Bytes
Versions: 4
Compression:
Stored size: 381 Bytes
Contents
#!/usr/bin/env ruby root_dir = File.expand_path(File.join(File.dirname(__FILE__),'..')) lib_dir = File.join(root_dir,'lib') $LOAD_PATH << lib_dir unless $LOAD_PATH.include?(lib_dir) require 'benchmark' require 'combinatorics/power_set' Benchmark.bm do |b| (10..20).each do |n| array = (1..n).to_a b.report("n=#{n}") do array.power_set { |s| } end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
combinatorics-0.5.0 | benchmarks/power_set.rb |
combinatorics-0.4.4 | benchmarks/power_set.rb |
combinatorics-0.4.3 | benchmarks/power_set.rb |
combinatorics-0.4.1 | benchmarks/power_set.rb |