benchmark function

a simple routine for benchmarking R code