Hacker News new | ask | show | jobs
by seppoastian 3086 days ago
I got nearly the same ratio as the github example. (CPU is overclock to ~4 GHz)

  $ cat /proc/cpuinfo | grep 'model name' | uniq
  model name: Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz
  
  $ go version
  go version go1.9.1 windows/amd64
  
  $ go test -bench . --benchtime 10s
  goos: windows
  goarch: amd64
  Benchmark_AllocWithMake-12    20000  870349 ns/op
  Benchmark_AllocWithAppend-12  30000  561120 ns/op