Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upStore times as Unix timestamps instead of time.Time #370
Comments
This comment has been minimized.
This comment has been minimized.
|
This is worth exploring, yes, but we face much larger issues with respect to the outright in-memory sample arena duplication that occurs on expression evaluation. Cutting down the size for these underlying types, while valuable, still leaves us with the underlying anomaly of extraneous object allocation. We all know that the Go GC is not very aggressive in liberating unused pages, so we should treat this as a first step versus a total solution. |
This comment has been minimized.
This comment has been minimized.
|
Timestamps have been switched to custom types. |
juliusv
closed this
Dec 14, 2013
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 25, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
juliusv commentedOct 26, 2013
This would both dramatically reduce memory usage as well as potentially improve code (part 2 of #367 was caused by using time.Time instead of a Unix timestamp).
Currently a SamplePair consumes 32 bytes:
This could be brought down to half, 16 bytes, when using a 64-bit Unix timestamp.
However, samples aren't stored directly in a slice in type
Values, it stores pointers to them instead. So to each sample, we need to add 64 more bits in that case. The reduction would still be 40 bytes vs. 24 bytes. Maybe we should even think about not storing pointers, but direct values.