2 ms·
> but the service turned out to be GC limited Go indeed has a lousy GC (compared to the JVM, at least.) This is why, in most production Go codebases I've seen,
by derefr 6y ago
> but the service turned out to be GC limited
Go indeed has a lousy GC (compared to the JVM, at least.) This is why, in most production Go codebases I've seen, there's heavy reliance on https://golang.org/src/sync/pool.go https://golang.org/src/sync/pool.go (or a NIH knocked-together version of it, if the author doesn't realize sync/pool exists.)
Try just switching a few of your most-oft-called constructors to allocate from a pool. It's pretty much the lowest-hanging fruit for Go performance gains.
- likeabbas 6y agoRight, but if we go with Rust we won’t have to worry about GC issues