Re:Iterative Optimization on Hot Paths in Go Apps
by gok on Friday October 05, 2018 @04:00PM
(#18151228)
But a stack allocation is 0 or 1 instructions.
[ Parent
| on HN ]
Re:Iterative Optimization on Hot Paths in Go Apps
by pcwalton on Friday October 05, 2018 @04:12PM
(#18151325)
Not if you have to check for stack space, like Go does.
It's no coincidence that a bump allocator and a function prologue have exactly the same structure: check against a limit and bump a thread-local pointer. There are runtimes like Chicken Scheme that actually implement heaps using the stack!