48000 did_you_mean/lib
48000 /GitHub/did_you_mean/lib/did_you_mean/jaro_winkler.rb
| require 'benchmark/ips' | |
| Benchmark.ips do |x| | |
| x.report "nothing" do | |
| [1, 2, 3] | |
| end | |
| x.report "#-" do | |
| [1, 2, 3] - [3] | |
| end |
| Calculating ------------------------------------- | |
| each_char 924.000 i/100ms | |
| each_codepoint 1.381k i/100ms | |
| ------------------------------------------------- | |
| each_char 9.320k (± 5.1%) i/s - 47.124k | |
| each_codepoint 13.857k (± 3.6%) i/s - 70.431k | |
| Comparison: | |
| each_codepoint: 13857.4 i/s | |
| each_char: 9319.5 i/s - 1.49x slower |
| $ bundle config --global jobs 1 | |
| You are replacing the current global value of jobs, which is currently "4" | |
| $ gem uni coffee-script-source execjs jbuilder columnize spring debug_inspector tilt sdoc jquery-rails sass coffee-script uglifier sass-rails coffee-rails turbolinks sqlite3 byebug binding_of_caller web-console -aIx | |
| $ time rails new bundler-jobs-1 | |
| create | |
| ... | |
| create vendor/assets/stylesheets/.keep | |
| run bundle install |
| require 'rest-client' | |
| base_url = "http://simple.wiktionary.org/w/api.php?action=query&aplimit=23294&list=allpages&format=json" | |
| filename = "simple_english_titles.yml" | |
| count = nil | |
| apfrom = nil | |
| num = 0 | |
| titles = [] | |
| begin |
| # This data is based on Birkbeck Spelling Error Corpus: http://ota.ox.ac.uk/headers/0643.xml | |
| # More specifically, this is a yaml version of the data in FAWTHROP1DAT.643 and FAWTHROP1DAT.643. | |
| --- | |
| abattoir: abbatoir | |
| abhorrence: abhorence | |
| absence: absense | |
| absorbent: absorbant | |
| absorption: absorbtion | |
| accede: acceed | |
| accelerate: acellerate |