Arc Forumnew | comments | leaders | submitlogin
2 points by stefano 5887 days ago | link | parent

> How much more expensive is cons compared to multiple return values?

It depends on the GC used and on the implementation. mrvs are usually pushed on the stack, so there is no GC overhead. When I develop applications with Lisp, I notice that most of the time reducing the amount of garbage speeds up the program noticeably. It's not only a problem of consing, it's also a problem of collecting the garbage. More garabage, more collection cycles.