|
|
|
|
|
by _bxg1
2410 days ago
|
|
> it is relying on undocumented behavior that is not part of the contract Go provides and could randomly break later Sort of. A change in the undocumented behavior might cause you to lose your fine-tuning at some point in the future, but I wouldn't say it'll ever cause it to break. You're just telling Go how much memory you want to pre-allocate. It'll continue doing that; if that stops getting you the same GC benefits you wanted, then at worst you'll be back in the same boat you were originally. Writing your own GC routine, on the other hand, gives you a ton of new opportunities for introducing very real breakage via your own code. |
|