3 ms·
think of it as something like creating a pool using WeakReferences in java, you're telling the GC that it's ok to collect that object so you're not using up ext
by kinofcain 13y ago
think of it as something like creating a pool using WeakReferences in java, you're telling the GC that it's ok to collect that object so you're not using up extra ram, but you still get the performance benefit of re-using objects.
(Go's implementation is potentially more efficient as you're not creating the extra WeakReference<> object, as you would be in java).