Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

19 lines (14 sloc) 0.376 kb
#!/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
Jump to Line
Something went wrong with that request. Please try again.