Benchmark different algorithms.