On Mon, Jul 20, 2020 at 7:34 PM wrote:
> I have an application where I will be allocating millions of data
> structures, all of the same size. My program will need to run continuously
> and be pretty responsive to
> its network peers.
>
>
I'd recommend quantifying "pretty responsive" in this case
All you are doing is replicating manual memory management. If you are going to
do that just use CGo with malloc & free so you will have decent debugging.
If not, don’t do this at all and let the GC do its work (but Go lack of a
generational GC might be an issue here).
> On Jul 20, 2020, at 12
Check https://godoc.org/modernc.org/memory, maybe it can be used in this
scenario. Note, using the package concurrently from multiple goroutines
requires coordination, like with a mutex.
On Mon, Jul 20, 2020, 19:35 wrote:
> I have an application where I will be allocating millions of data
> stru
I have an application where I will be allocating millions of data
structures, all of the same size. My program will need to run continuously
and be pretty responsive to
its network peers.
The data is fairly static, once allocated it will rarely need to be
modified or deleted.
In order to mini