4 ms·
> How do you, for example, pool the allocations that closures or defer perform? It's a strange area that demands reliable or stable performance but uses closur
by duaneb 11y ago
> How do you, for example, pool the allocations that closures or defer perform?
It's a strange area that demands reliable or stable performance but uses closures and exceptions, two ways to inject a healthy amount of noise into your understanding of the program, and certainly blows the upper bound on "arbitrary wait time" to huge. I haven't been presented with a problem yet that allowed you to complain about GC with respect to latency where you would want implicit allocations happening all over the case....
- pcwalton 11y agoYou can't get away from exceptions in Go. Closures, maybe, depending on the code you're writing (though I doubt it), but the highly dynamic semantics of defer makes it impossible to avoid.