Thanks for the feedback.  I should explain that efficiency is not 
(currently) a problem.

The thing I love about Go is that there is always a simple and obvious (and 
reasonably efficient) way to do things. I'm currently call time.Now().UTC() 
no more than a few thousand times per second and store not much more 1G 
(1e9) time.Times in RAM at once. I have considered things like "caching" 
the current (monotonic) time (only calling time.Now once per millisecond 
but incrementing to ensure each time is unique) and storing an 8-byte 
duration from a fixed time instead of a 24-bit time.Time (saving many GB of 
RAM). However, this will complicate the code and we currently have more 
than enough CPU and RAM.

My only current problem is that I have been for years creating deadlines 
using Times with hasMonotonic turned off, while I unknowingly assured my 
boss that I was using a "steady" clock.  It never occurred to me that this 
would be a side-effect of calling the UTC() method.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/40518322-51b5-4c0a-855a-793d43f171c7n%40googlegroups.com.

Reply via email to