On Thu, May 24, 2018 at 10:08 AM <[email protected]> wrote:
> So, I want to know is that normal to be this slow?
I think it's not normal.
jnml@r550:~/src/tmp> cat x_test.go
package main
import (
"testing"
"time"
)
func BenchmarkTimeNow(b *testing.B) {
for i := 0; i < b.N; i++ {
time.Now()
}
}
jnml@r550:~/src/tmp> go test -bench .
goos: linux
goarch: amd64
pkg: tmp
BenchmarkTimeNow-4 20000000 61.3 ns/op
PASS
ok tmp 1.297s
jnml@r550:~/src/tmp>
Here's openSUSE Leap, 42.3 64-bit, Linux 4.4.126-48-default x86_64, Intel®
Xeon(R) CPU X5450 @ 3.00GHz × 4.
--
-j
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.