14 ms·
Do you need to work around Go's escape analysis much? I was under the impression that it's good but not perfect, leading to some heap allocation of variables th
by messe 5y ago
Do you need to work around Go's escape analysis much? I was under the impression that it's good but not perfect, leading to some heap allocation of variables that wouldn't necessarily need it if they were on C/C++.
- lukem567 5y agoI think "good but not perfect" describes my experience here as well. I've certainly needed to rework some bits of code that were allocating when I didn't expect them to, but so far, this has not become too onerous (yet). The "write a little bit of code, then test it to see if it allocates" approach has been very useful. That way I don't get too far out on a limb with a bunch of allocating code and no easy way to clean things up.