Skip to content

Instantly share code, notes, and snippets.

@floere
Last active January 2, 2016 05:59
Show Gist options
  • Save floere/8260447 to your computer and use it in GitHub Desktop.
Save floere/8260447 to your computer and use it in GitHub Desktop.
Comparison of 1000 queries each using Picky running on Ruby 1.9 and 2.1. (Not a good absolute measurement, as the case is pathological – but good for comparison between Rubies)
hanke@soyuz:performance:[master *] chruby 1.9
hanke@soyuz:performance:[master *] perfer run -m 5 perfer.rb
Sanity check:
>|2014-01-04 21:34:25|0.000096|florian | 1| 0| 1|
Session Search#search with ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-darwin12.4.0]
Taking 5 measurements of at least 1.0s
Search#search('florian') with variable index size and fixed search size 1024 in 68.06 ms ± 6.077 ( 8.9%)
Search#search('florian') with variable index size and fixed search size 2048 in 82.98 ms ± 6.361 ( 7.7%)
Search#search('florian') with variable index size and fixed search size 4096 in 117.8 ms ± 4.519 ( 3.8%)
Search#search('florian') with variable index size and fixed search size 8192 in 213.9 ms ± 3.950 ( 1.8%)
Search#search('florian') with variable index size and fixed search size 16384 in 526.0 ms ± 12.86 ( 2.4%)
Search#search('florian') with variable index size and fixed search size 32768 in 1.610 s ± 0.212 (13.2%)
hanke@soyuz:performance:[master *] chruby 2.1
hanke@soyuz:performance:[master *] perfer run -m 5 perfer.rb
Sanity check:
>|2014-01-04 21:36:06|0.000120|florian | 1| 0| 1|
Session Search#search with ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin13.0]
Taking 5 measurements of at least 1.0s
Search#search('florian') with variable index size and fixed search size 1024 in 52.82 ms ± 7.028 (13.3%)
Search#search('florian') with variable index size and fixed search size 2048 in 53.04 ms ± 7.420 (14.0%)
Search#search('florian') with variable index size and fixed search size 4096 in 74.25 ms ± 1.610 ( 2.2%)
Search#search('florian') with variable index size and fixed search size 8192 in 119.0 ms ± 14.99 (12.6%)
Search#search('florian') with variable index size and fixed search size 16384 in 243.7 ms ± 60.64 (24.9%)
Search#search('florian') with variable index size and fixed search size 32768 in 401.3 ms ± 34.78 ( 8.7%)
Search#search('florian') with variable index size and fixed search size 65536 in 648.7 ms ± 61.38 ( 9.5%)
Search#search('florian') with variable index size and fixed search size 131072 in 1.324 s ± 0.027 ( 2.1%)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment