3 ms·
The stack doesn't have to be in the heap to make things better for recursion* , the JVM just needs to support tail-call optimisation. See my blog post: http://
by richdougherty 13y ago
The stack doesn't have to be in the heap to make things better for recursion* , the JVM just needs to support tail-call optimisation.
See my blog post: http://blog.richdougherty.com/2009/04/tail-calls-tailrec-and-trampolines.html http://blog.richdougherty.com/2009/04/tail-calls-tailrec-and...
I'm excited to see tail-call optimisation ("proper tail calls") coming to JavaScript. Hopefully a bit of competition will encourage the JVM to clean up its act too.
http://bbenvie.com/articles/2013-01-06/JavaScript-ES6-Has-Tail-Call-Optimization http://bbenvie.com/articles/2013-01-06/JavaScript-ES6-Has-Ta...
(* Heap-allocated frames can help with other things though, e.g continuations.)