2 ms·
For Go? Honestly not sure. In principle it can be faster but as someone pointed out in another comment this one has some subtle issues. In manual languages lik
by fsociety 3y ago
For Go? Honestly not sure. In principle it can be faster but as someone pointed out in another comment this one has some subtle issues.
In manual languages like C or C++, you can use these to allocate a fixed set of memory on program init (keeps system resources under control), to get contiguous allocations (friendly for caches), to keep yourself sane for memory (clear start and end to the lifecycle of an object), and to be very performant (if used correctly).