3 ms·
It appears to be storing routes in a tree structure allocated via struct literals in router setup. I'm imagining that if performance is relying on them always b
by bkeroack 12y ago
It appears to be storing routes in a tree structure allocated via struct literals in router setup. I'm imagining that if performance is relying on them always being on the stack, that would be an implementation detail of the Go runtime and may change.
Looks like a decent implementation, but aesthetically I dislike monolithic "frameworks" (eg: "echo.New()"). The "Go way" is to write small composable libraries, not opaque frameworks. Gorilla would have been a good model to draw inspiration from.
- placeybordeaux 12y agoIt seems like it takes most of the important interfaces, in which case I feel like it is close enough to the "Go way".
- detaro 12y ago> I'm imagining that if performance is relying on them always being on the stack In which case can it make a performance difference if memory is on the stack or somewhere else in memory?