Sha256: 393997e08c5afbb59ce194c2f2b27e6ec15957a89efed2ef76fde971886f0551
Contents?: true
Size: 376 Bytes
Versions: 4
Compression:
Stored size: 376 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/derange' Benchmark.bm do |b| (1..10).each do |n| array = (1..n).to_a b.report("n=#{n}") do array.derange { |s| } end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
combinatorics-0.5.0 | benchmarks/derange.rb |
combinatorics-0.4.4 | benchmarks/derange.rb |
combinatorics-0.4.3 | benchmarks/derange.rb |
combinatorics-0.4.1 | benchmarks/derange.rb |