Episode

Oliver Medhurst - Porffor - JavaScript Ahead of Time Compiler

Podcast
devtools.fm: Developer Tools, Open Source, Software Development
Published
Oct 20, 2025
Duration seconds
2918
Processing state
processed
Canonical source
https://podcasters.spotify.com/pod/show/devtoolsfm/episodes/Oliver-Medhurst---Porffor---JavaScript-Ahead-of-Time-Compiler-e39okc8
Audio
https://anchor.fm/s/dd6922b4/podcast/play/109907784/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2025-9-20%2F409568837-44100-2-5038c23cc3993.m4a
JSON
/v1/public/podcasts/devtools-fm/episodes/oliver-medhurst-porffor-javascript-ahead-of-time-compiler
Markdown
/podcast/devtools-fm/oliver-medhurst-porffor-javascript-ahead-of-time-compiler.md

Actions

  • 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.
  • 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.

Summary

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.

Topics

  • JavaScript
  • WebAssembly
  • Ahead-of-Time Compilation
  • Software Engineering
  • Browser Internals
  • Serverless Computing
  • Runtime Environments
  • Compiler Design

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

Chapters

  1. 1:00 Developer Background: Oliver discusses his journey from a self-taught developer to working on Firefox internals at Mozilla.
  2. 4:35 The Case for AOT Compilation: An exploration of why avoiding JIT compilation overhead is essential for reducing startup latency in large applications.
  3. 8:05 Implementing Closures: The technical difficulties and bugs encountered when attempting to compile JavaScript closures to WebAssembly.
  4. 19:05 JavaScript in Game Engines: Discussing the utility of using compiled JavaScript as a scripting language for game engines and embedded systems.
  5. 26:25 The Path to Production: The challenges of making a compiler production-ready, specifically regarding memory allocation and API compatibility.
  6. 40:55 The Future of JS Runtimes: Speculating on the evolution of serverless runtimes and the potential for new, specialized JavaScript engines.