miniblog.
← Back to all posts
Aug 10, 2013 at 19:01
You can abuse JavaScript's setTimeout for basic tail call optimisation. Neat.
Wilfred Hughes
Related Posts
Jan 30, 2023 at 06:21
I really like languages that store their runtime stack on the heap, such as Smalltalk. You can write code as if you have tail call optimisation, but you still have normal stack traces for debugging.
Wilfred Hughes
Shared words: optimisation, tail, call Score: 61.9
Mar 4, 2019 at 00:21
Adding a tail-call optimisation macro (for self-calls) is a really fun lispy project:
https://github.com/Wilfred/tco.el/blob/179b82cacbd59692e3c187b98f87a1f453923878/tco.el#L51-L63
Ironically, I've implemented TCO using a recursive function that can blow the stack.
tco.el/tco.el at 179b82cacbd59692e3c187b98f87a1f453923878 · Wilfred/tco.el
Tail call optimisation in Emacs lisp. Contribute to Wilfred/tco.el development by creating an account on GitHub.
Wilfred Hughes
Shared words: optimisation, tail, call Score: 61.9
Nov 19, 2016 at 13:07
Did you know that Emacs already supports tail-call optimisation in the bytecode interpreter?
https://github.com/emacs-mirror/emacs/blob/92b3528cf3e6d366086e89b9a909f0c81614a064/src/bytecode.c#L662-L666
(me neither!)
emacs/src/bytecode.c at 92b3528cf3e6d366086e89b9a909f0c81614a064 · emacs-mirror/emacs
Mirror of GNU Emacs. Contribute to emacs-mirror/emacs development by creating an account on GitHub.
Wilfred Hughes
Shared words: optimisation, tail, call Score: 61.9