Skip to content

Instantly share code, notes, and snippets.

@c910335
c910335 / intro_sort.cr
Last active November 6, 2016 15:45
I have no idea why this is faster than std::sort in cpp.
class Array
def sort!
Array.intro_sort!(@buffer, @size)
self
end
def sort!(&block : T, T -> Int32)
Array.intro_sort!(@buffer, @size, block)
self
end