Skip to content

Instantly share code, notes, and snippets.

@nashby
Created November 15, 2011 20:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nashby/1368315 to your computer and use it in GitHub Desktop.
Save nashby/1368315 to your computer and use it in GitHub Desktop.
rubinius sorting benchmarks
~/projects/rubinius (git)-[master] % bin/benchmark benchmark/core/array/bench_sort.rb 23:46
=== bin/rbx ===
sort strings ascending
4244.9 (±0.5%) i/s - 21284 in 5.014169s (cycle=313)
array sort! strings ascending
4207.8 (±0.9%) i/s - 21267 in 5.054594s (cycle=417)
sort strings descending with block
1397.7 (±0.6%) i/s - 7124 in 5.096934s (cycle=137)
sort! strings descending with block
1387.8 (±0.9%) i/s - 6987 in 5.035176s (cycle=137)
sort numbers ascending
2241.3 (±0.6%) i/s - 11340 in 5.059756s (cycle=210)
array sort! numbers ascending
2142.5 (±0.5%) i/s - 10850 in 5.064239s (cycle=217)
sort numbers descending with block
973.9 (±2.3%) i/s - 4896 in 5.030146s (cycle=96)
sort! numbers descending with block
1001.4 (±3.2%) i/s - 5049 in 5.048253s (cycle=99)
sort time ascending 1636.7 (±0.3%) i/s - 8320 in 5.083566s (cycle=160)
array sort! time ascending
1641.1 (±0.4%) i/s - 8211 in 5.003559s (cycle=161)
sort time descending with block
890.0 (±1.8%) i/s - 4472 in 5.026628s (cycle=86)
sort! time descending with block
835.5 (±2.8%) i/s - 4233 in 5.071181s (cycle=83)
sort nested fixnum arrays ascending
258.3 (±0.4%) i/s - 1311 in 5.075698s (cycle=23)
array sort! nested fixnum arrays ascending
259.3 (±0.4%) i/s - 1300 in 5.013860s (cycle=25)
sort nested fixnum arrays descending with block
214.9 (±0.0%) i/s - 1080 in 5.025706s (cycle=20)
sort! nested fixnum arrays descending with block
212.3 (±2.8%) i/s - 1080 in 5.092270s (cycle=20)
~/projects/rubinius (git)-[a2707e3...] % bin/benchmark benchmark/core/array/bench_sort.rb 23:51
=== bin/rbx ===
sort strings ascending
4239.2 (±0.6%) i/s - 21384 in 5.044527s (cycle=297)
array sort! strings ascending
4234.9 (±0.5%) i/s - 21420 in 5.058130s (cycle=420)
sort strings descending with block
1669.7 (±1.0%) i/s - 8370 in 5.013359s (cycle=155)
sort! strings descending with block
1691.9 (±0.9%) i/s - 8476 in 5.010288s (cycle=163)
sort numbers ascending
2314.9 (±1.6%) i/s - 11772 in 5.086776s (cycle=218)
array sort! numbers ascending
2304.0 (±1.7%) i/s - 11544 in 5.011979s (cycle=222)
sort numbers descending with block
1858.7 (±1.1%) i/s - 9464 in 5.092407s (cycle=182)
sort! numbers descending with block
1910.2 (±0.7%) i/s - 9568 in 5.009058s (cycle=184)
sort time ascending 1869.9 (±0.2%) i/s - 9464 in 5.061222s (cycle=182)
array sort! time ascending
1865.2 (±0.1%) i/s - 9464 in 5.073906s (cycle=182)
sort time descending with block
1625.4 (±0.5%) i/s - 8268 in 5.086747s (cycle=159)
sort! time descending with block
1664.2 (±1.1%) i/s - 8424 in 5.062399s (cycle=162)
sort nested fixnum arrays ascending
261.6 (±0.4%) i/s - 1311 in 5.011419s (cycle=23)
array sort! nested fixnum arrays ascending
259.2 (±0.4%) i/s - 1300 in 5.014980s (cycle=25)
sort nested fixnum arrays descending with block
231.9 (±0.4%) i/s - 1166 in 5.027884s (cycle=22)
sort! nested fixnum arrays descending with block
233.0 (±0.4%) i/s - 1166 in 5.003673s (cycle=22)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment