Skip to content

Instantly share code, notes, and snippets.

@padde
Last active December 16, 2015 12:19
Show Gist options
  • Select an option

  • Save padde/5433922 to your computer and use it in GitHub Desktop.

Select an option

Save padde/5433922 to your computer and use it in GitHub Desktop.
require 'fruity'
compare do
rubylovely {
a3 = [["a", "b"], ["a","c"], ["b","c"], ["b", "a"], ["c","b"],["b", "a"]]
a3.each {|x| a3.delete(x.reverse) if a3.include? x.reverse}
}
padde {
a3 = [["a", "b"], ["a","c"], ["b","c"], ["b", "a"], ["c","b"],["b", "a"]]
a3.uniq!(&:sort!)
}
end
@padde
Copy link
Author

padde commented Apr 22, 2013

On my machine this produces

Running each test 256 times. Test will take about 1 second.
padde is faster than rubylovely by 10.000000000000009% ± 10.0%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment