I was suspecting the hardware too, but I tested the benchmark on Go 1.8 <https://gist.github.com/reinit/82608ab20e5aac3bd3c1eb5a8f78d23c#gistcomment-2599379>, and found it can do 1825 ns/op. It's still slow though (maybe related to problems on my OS/hardware), but it way faster than the one under Go 1.10.
I did the test on both my computer and Cloud 9 IDE <https://c9.io/>, and able reproduce the result. After dig into the code and I found they've changed the underlaying calls, maybe that's why newer version of time.Now is slower. On Thursday, May 24, 2018 at 7:15:06 PM UTC+8, Jesper Louis Andersen wrote: > > On Thu, May 24, 2018 at 10:08 AM <ran...@gmail.com <javascript:>> wrote: > >> >> After I benchmark time.Now on my computer, I found that the time.Now >> takes about 3758 ns to perform one operation, which is not very fast. The >> benchmark is here >> <https://gist.github.com/reinit/82608ab20e5aac3bd3c1eb5a8f78d23c> >> (benchmarked on my Ubuntu 18.04 LTS machine). >> >> > What is the stack down to the hardware? My immediate hunch would be that > something along that path interferes. > -- 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 golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.