Use testing.AllocsPerRun instead of custom implementation