update project optimization settings. refactor main. refactor sorts to use same closure. add sort name enum, typealias for sort closure, run 10 trials and average.