Benchmarking in Golang: Improving function performance