from Hacker News

Tail Call Optimization Implementation in JavaScript Engines

by mmsc on 3/31/25, 3:27 AM with 1 comments

  • by starmole on 3/31/25, 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.