Skip to content

Instantly share code, notes, and snippets.

View tomascco's full-sized avatar

Tomás Coêlho tomascco

View GitHub Profile
@tomascco
tomascco / benchmark.rb
Created July 30, 2020 17:49
Código do benchmark - aula 9
require_relative 'quickselect'
require 'benchmark'
array = (1..10_000_000).to_a.shuffle
n = 100
p = 123_423
Benchmark.bmbm do |bench|
bench.report('quicksort') do
quicksort(array, 0, array.size - 1, LomutoPartition)