Arc Forumnew | comments | leaders | submitlogin
1 point by jazzdev 5295 days ago | link | parent

Yeah, Jarc doesn't use that version of list either. No need.

But copylist is also used by copy which is used by sort. So the sort benchmark ran into it. I guess since Rainbow compiles to CPS the copylist doesn't stack overflow in Rainbow.



3 points by conanite 5295 days ago | link

rainbow grows its stack as needed, and will eventually run out of memory with a non-tail-recursive copylist and a big enough list. Scheme seems to be able to optimise "tail recursion modulo cons" - I've tried copylist with tens of millions of elements and scheme doesn't break; rainbow does.

-----

3 points by jazzdev 5295 days ago | link

I pushed scheme to the limit and it died with an insufficient memory error. I never got a stack error.

-----