use @inbounds loop in sort!
use insertion sort if arrays are small