Benchmarking routine for R