Add the cppsort function for comparison.