Based on the Heap Sort described in the book "Algorithms in a Nutshell" by Gary Pollice, Stanley Selkow, George T. Heineman.
https://www.oreilly.com/library/view/algorithms-in-a/9780596516246/ch04s06.html
About 10 x more efficient than bubble sort !
- Buildheap : about 1800 clock cycles
- Sort part : about 11050 clock cycles for 255 items.