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

I thought that Common Lisp guaranteed Tail Call Optimization (TCO), but it looks like it's actually up to the implementation: http://0branch.com/notes/tco-cl.html


Scheme guarantees it; CL only provides it as an option.


Nit pick: if it is guaranteed, call it Elimination, not Optimization, because it is part of the operational semantics required to reason about performance. As a compiler Optimization, you have an algorithm that is omega(n) space usage, but with Elimination as a language feature you have an O(1) space usage.

Yes, you can include compiler optimizations in your model of the language, but it helps to distinguish opportunitistic speedups from guaranteed complexity class improvements.




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

Search: