3 ms·
Haskell allocates 1KB (which is also much larger than the allocation required for a typical callback registration in event-based programming) initially, but gro
by Peaker 15y ago
Haskell allocates 1KB (which is also much larger than the allocation required for a typical callback registration in event-based programming) initially, but grows the stack in chunks of 4KB.
These small chunks come at a cost, too. The GHC runtime needs to copy around the edges of the stack at the chunk boundaries, and stack use becomes slightly more expensive.