Are you using the latest version of Go? time.Now() has been optimized recently.

On 24 May 2018, at 10:08, ran...@gmail.com<mailto:ran...@gmail.com> wrote:

I been working on something performance intensive lately, one feature of it 
require me to calculate the time gap between operation which require time.Now 
to make time marks.

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).

So, I want to know is that normal to be this slow? If it is (slow), then does 
there is an alternative way to to that?

Thank you!

--
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<mailto:golang-nuts+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.

-- 
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.

Reply via email to