Skip to content
The futile utility
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
spec
.gitignore
Gemfile
LICENSE.txt
README.md
Rakefile
futility.gemspec

README.md

Futility

The futile utility. Futility provides utility functions tuned to achieve previously unseen levels of performance.

Installation

Add this line to your application's Gemfile:

gem 'futility'

And then execute:

$ bundle

Or install it yourself as:

$ gem install futility

Usage

require 'futility'
array = [2,1,3]
Futility.sort!(array)

This will sort the array using a highly optimized sorting algorithm which can be paraphrased as follows:

def sort!(array)
    until is_sorted?(array)
        array.shuffle!
    end
end

For a detailed analysis, see Bogosort

Benchmarks will be posted as soon as they finish running.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request
You can’t perform that action at this time.