A comparison of common sorting algorithms