Tail Call Optimization Implementation in JavaScript Engines

by mmscon 3/31/2025, 3:27 AMwith 1 comments

by starmoleon 3/31/2025, 4:26 AM

Be amazed by learning about tail calls in WASM:

https://v8.dev/blog/wasm-tail-call

the key here is that there are new, different opcodes that can be tail call optimized! Because tail call optimizing the old op code would break the spec. It all makes sense, but is kind of amazing.