Optimized cascading version of hybrid heapsort