News for hackers. Stuff that matters.
Re:Echo: A fast HTTP router and micro framework in Go by jjbiotech on Tuesday March 31, 2015 @11:29AM (#9296958)
What do you mean by zero memory allocation? The title seems contradictory. You have to allocate at least some memory for a program to run.

Do you mean it doesn't allocate any memory per request, it just uses pre allocated memory?

Re:Echo: A fast HTTP router and micro framework in Go by ComputerGuru on Tuesday March 31, 2015 @11:43AM (#9297105)
That's standard terminology in libraries, especially in parsers. You don't really care about overhead memory, you're concerned with scaling one the requests start coming in.

With things like C-based HTTP or JSON parsers, they will use the same memory space that is being passed to them to par/lex/etc but in this case with a Go library I'm honestly not sure what To does behind the scenes (I haven't looked at the source).

Re:Echo: A fast HTTP router and micro framework in Go by m0th87 on Tuesday March 31, 2015 @11:49AM (#9297196)
I thought it meant that they were only allocating on the stack instead of the heap, (which would still be wrong terminology-wise) but they're clearly doing heap allocations from the examples: https://github.com/labstack/echo/blob/master/example/main.go
Re:Echo: A fast HTTP router and micro framework in Go by sctb on Tuesday March 31, 2015 @12:03PM (#9297342)
We removed "with zero memory allocation" from the title, because it may be misleading.
Re:Echo: A fast HTTP router and micro framework in Go by JulianMorrison on Tuesday March 31, 2015 @12:20PM (#9297510)
"Constant space" and "zero garbage" perhaps?
Re:Echo: A fast HTTP router and micro framework in Go by noselasd on Tuesday March 31, 2015 @12:45PM (#9297752)
He means zero _dynamic_ memory allocation.
Re:Echo: A fast HTTP router and micro framework in Go by gilini on Tuesday March 31, 2015 @11:32AM (#9296992)
Yeah, seems like a sensationalist title tbh. The project README doesn't giving any info to support that claim as well.

It doesn't make any sense.

Re:Echo: A fast HTTP router and micro framework in Go by _ak on Tuesday March 31, 2015 @11:35AM (#9297014)
The benchmark section in the README clearly shows the echo router to be the only one of all benchmarked routers that has exactly 0 allocations per request.
Re:Echo: A fast HTTP router and micro framework in Go by zzzcpan on Tuesday March 31, 2015 @11:37AM (#9297033)
I think he wants it to be a framework without any heap allocations.