Choose a better pivot: eg. in median-of-three you pick 3 (random) elements and choose the pivot as the median element
When length(a[]) < M (in practice choose M = 9) stop sorting. After qsort() finished apply insert sort which would take roughly M * N = O(N). This avoids many function calls close to leaf of the divide-et-impera recursion tree.