4 ms·
It is interesting and surprising how many allocations per request other frameworks do, from 100s to 10000s. They're sort of cheating by having a pool, and sort
by tlb 12y ago
It is interesting and surprising how many allocations per request other frameworks do, from 100s to 10000s.
They're sort of cheating by having a pool, and sort of punting with things like "// MaxParam sets the maximum allowed path parameters. Default is 5..."
- adrusi 12y agoHow is that cheating? That's just how you program without allocations.
- tlb 12y agoPool allocations are still allocations. If you look at the implementation for Pool.get, it works a lot like malloc: http://golang.org/src/sync/pool.go http://golang.org/src/sync/pool.go I've programmed without pools or allocations, where everything had statically allocated storage. Both for microcontroller firmware, and telephony software. It's noticeably harder.