# Oliver Medhurst - Porffor - JavaScript Ahead of Time Compiler Page: https://stenobird.com/podcast/devtools-fm/oliver-medhurst-porffor-javascript-ahead-of-time-compiler Text version: https://stenobird.com/podcast/devtools-fm/oliver-medhurst-porffor-javascript-ahead-of-time-compiler.md Podcast: [devtools.fm: Developer Tools, Open Source, Software Development](https://stenobird.com/podcast/devtools-fm) Published: 2025-10-20T01:52:52+00:00 Episode link: https://podcasters.spotify.com/pod/show/devtoolsfm/episodes/Oliver-Medhurst---Porffor---JavaScript-Ahead-of-Time-Compiler-e39okc8 Audio file: https://anchor.fm/s/dd6922b4/podcast/play/109907784/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2025-9-20%2F409568837-44100-2-5038c23cc3993.m4a Processing state: processed JSON: https://stenobird.com/v1/public/podcasts/devtools-fm/episodes/oliver-medhurst-porffor-javascript-ahead-of-time-compiler Duration seconds: 2918 ## Resource Porffor is an experimental ahead-of-time (AOT) compiler that transforms JavaScript into WebAssembly to eliminate startup latency. The discussion explores the technical challenges of implementing closures and the potential for high-performance, small-footprint JS runtimes in serverless and embedded environments. ## Highlights - Main idea: Porffor targets the 10% of JavaScript use cases where startup time and binary size are more critical than peak throughput - Technical challenge: Implementing closures correctly is currently the most complex and bug-prone part of the compilation process - Performance optimization: Small changes in code structure, such as passing objects instead of multiple arguments, can significantly impact AOT compilation efficiency - Failure mode: Relying on heavy JIT-dependent patterns or large Node.js APIs can break the compatibility of an AOT-compiled runtime - Practical takeaway: AOT compilation is a powerful tool for serverless and edge computing where avoiding 'cold starts' is a primary requirement ## Topics JavaScript, WebAssembly, Ahead-of-Time Compilation, Software Engineering, Browser Internals, Serverless Computing, Runtime Environments, Compiler Design ## Chapters - 1:00 — Developer Background: Oliver discusses his journey from a self-taught developer to working on Firefox internals at Mozilla. - 4:35 — The Case for AOT Compilation: An exploration of why avoiding JIT compilation overhead is essential for reducing startup latency in large applications. - 8:05 — Implementing Closures: The technical difficulties and bugs encountered when attempting to compile JavaScript closures to WebAssembly. - 19:05 — JavaScript in Game Engines: Discussing the utility of using compiled JavaScript as a scripting language for game engines and embedded systems. - 26:25 — The Path to Production: The challenges of making a compiler production-ready, specifically regarding memory allocation and API compatibility. - 40:55 — The Future of JS Runtimes: Speculating on the evolution of serverless runtimes and the potential for new, specialized JavaScript engines. ## Actions - request_transcript: `POST https://stenobird.com/v1/public/podcasts/devtools-fm/episodes/oliver-medhurst-porffor-javascript-ahead-of-time-compiler/transcription-requests` — Idempotently request low-priority transcript generation for this episode. - read_markdown: `GET https://stenobird.com/podcast/devtools-fm/oliver-medhurst-porffor-javascript-ahead-of-time-compiler.md` — Read the agent-friendly Markdown representation of this episode resource. A page view does not enqueue transcription. Agents should invoke `request_transcript` explicitly when they need this episode processed. ## Transcript Full transcripts are not published on public pages unless there is a clear rights basis.