Skip to content

Instantly share code, notes, and snippets.

@mac-r
Created August 14, 2012 22:04
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 mac-r/3353415 to your computer and use it in GitHub Desktop.
Save mac-r/3353415 to your computer and use it in GitHub Desktop.
Binary Heaps in the Context of Prioritization #3
n = 220
k = 1
Benchmark.bm do |x|
n.times do
x.report("Heaps_#{k*1000}x#{k*100}:") { heap_extractor(k*1000, k*100) }
x.report("Sort_#{k*1000}x#{k*100}:") { sorted_array_shifter(k*1000, k*100) }
k += 1
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment