2 ms·
> I'm not sure what the right way to do these… In which case, maybe what you see is as good as you'll get. > … some languages get to preallocate… Here's Go u
by igouy 5y ago
> I'm not sure what the right way to do these…
In which case, maybe what you see is as good as you'll get.
> … some languages get to preallocate…
Here's Go using a library pool —
https://benchmarksgame-team.pages.debian.net/benchmarksgame/program/binarytrees-go-6.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
- sirwhinesalot 5y agoThe sync library is part of Go's standard library and is meant to allow safe concurrent access by multiple goroutines. It's pretty idiomatic Go!
- igouy 5y agoYes — so "allowed to preallocate memory" ?