3 ms·
> Say you have 4 cores, 1 would be dedicated to GC In my opinion, idiomatic golang is not that GC heavy. A slice (a bit like ArrayList) of structs can be a con
by vardump 9y ago
> Say you have 4 cores, 1 would be dedicated to GC
In my opinion, idiomatic golang is not that GC heavy. A slice (a bit like ArrayList) of structs can be a contiguous chunk of memory as opposed to array of object references, which requires allocating each object separately.
There are an order of magnitude less allocated objects than in Java for example. (Perhaps the situation will change once Java gains value types in maybe Java 9).