Implement the benchmark code.