On Thu, 9 Dec 2021 16:40:26 +0000 Nicholas Clark <nick@ccl4.org> wrote: > I don't think that this reasoning about larger stacks really pans out > as you fear. <snip> Oh I think "fear" is a strong word. It's not that I think "oh this will be terrible", I'm just aware it's a change to the memory locality behaviour, and we should be aware that it will perform differently. But indeed as you say, there may become benefits to caching behaviour and so on that overall mean an improvement. Overall I agree with your wording here about steady-state. > Also, unlike *nix C code, I don't think that the perl internals forbid > chunked stacks*. So on subroutine entry (or any suitable nextstate, *I > think*), we could decide that if the stack is already too unwieldy, > just to push a new stack onto the stack of stacks. This might address > the "deep recursion" caveat above. Ooh, that's a thought too. Depending on how we solve the "base pointer to start of arguments on the stack" problem, I don't think nextstate would be a suitable time to reällocate a stack, but I can't think of any reason why entersub couldn't just go "eh, stack too big, lets have another". -- Paul "LeoNerd" Evans leonerd@leonerd.org.uk | https://metacpan.org/author/PEVANS http://www.leonerd.org.uk/ | https://www.tindie.com/stores/leonerd/Thread Previous | Thread Next