Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The allocation speed will be close; a bit worse since the pointer to the end of the current allocation buffer usually isn't in a register and a function call and range check is required. However the overall cost of handling that memory from start to finish is significantly higher than the stack even if it gets clobbered in the first nursery collection.

Not because it is very high, but because stack allocation/deallocation is so very simple.



Range checks can be done by the MMU, they're basically free.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: