This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based on Dave Koelle's Alphanum algorithm | |
# Rik Hemsley, 2007 | |
# WegoWise Inc., 2013 | |
# See also http://rikkus.info/arch/sensible_sort.rb | |
# | |
# This library is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU Lesser General Public | |
# License as published by the Free Software Foundation; either | |
# version 2.1 of the License, or any later version. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'benchmark' | |
require 'natural_sort' | |
require 'naturally' | |
require 'natcmp' | |
require './lib/sort_authority' | |
require './lib/sort_authority/ext/enumerable' | |
require './sensible_sort' | |
def randomish_string | |
(0...20).map do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'benchmark' | |
require 'natural_sort' | |
require 'naturally' | |
require 'natcmp' | |
require './lib/sort_authority' | |
require './lib/sort_authority/ext/enumerable' | |
require './sensible_sort' | |
ary = ['x 1'] * 100_000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.9.3p194 :001 > module Smell | |
1.9.3p194 :002?> def initialize | |
1.9.3p194 :003?> puts "oh man this smells" | |
1.9.3p194 :004?> end | |
1.9.3p194 :005?> end | |
=> nil | |
1.9.3p194 :006 > class Fart | |
1.9.3p194 :007?> include Smell | |
1.9.3p194 :008?> def initialize who_dealt_it | |
1.9.3p194 :009?> super |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.testFunctions = function() | |
{ | |
var launcher = this; | |
var tests = []; | |
var i = 0; | |
while(i < 100) | |
{ | |
(function (i) | |
{ | |
var func = function(callback) |