AI summary by TwinMind
Porffor: Compile Your JavaScript To WebAssembly
Theo - t3․gg
20m 49s
Porffor Introduction & Performance Claims
- Porffor: experimental ahead-of-time JS engine compiling JS to WebAssembly/native code
- Created by 19-year-old developer "honk" (Canada)
- Claims up to 18x faster than Javy (existing JS to WASM toolchain)
- Promises performance improvements while maintaining JS compatibility
- Very early stage, not production-ready
Live Performance Testing
- Simple isPrime function test with 10,000 iterations
- Porffor execution: 7ms → 450ms with added zero → crashed browser with too many zeros
- Node.js comparison: 0.06s total, 0.02s user time → 0.62s with added zero → 0.451s without console.log
- Performance difference modest, not exponentially better
- Real benefit: dramatically smaller binary size (90MB Node binary → <50KB)
Developer Background & Credibility
- Honk: 19 years old, worked at Mozilla for 10 months, recently quit to work on Porffor full-time
- Created/maintains test262 compatibility testing site
- Funded by Chris Wanstrath (original GitHub CEO)
- Strong technical credentials in JS engine compatibility testing
Runtime Ecosystem Positioning
- Comparison matrix across performance vs binary size axes:
- Bun: high performance, large binary
- Node/V8: medium performance, large binary
- Deno: slightly better than Node, still large
- Static Hermes: high performance, medium binary, TypeScript-focused
- LLRT: optimized binary size, performance hit acceptable
- Porffor: targeting high performance + small binary (unique position)
Technical Architecture & Compilation Pipeline
- Compilation chain: TypeScript → JS → Porffor → WASM → C → Native binary
- Doesn't rely heavily on TypeScript type information (unlike Static Hermes)
- Can optimize using TS types but not to same extent as Static Hermes
- Goal: handle any JavaScript code with maximum optimization possible
Limitations & Use Cases
- Not recommended for browsers with dynamic content loading
- eval() and dynamic function definitions won't work (can't AOT compile unknown code)
- Compatibility will be limited compared to full JS engines
- Best for: embedded applications, games, desktop apps distributed through platforms like Steam
- Memory usage significantly lower (no full JS runtime needed)
WebAssembly Integration
- WASM provides ecosystem benefits, optimization tooling potential
- Limitations addressed by upcoming proposals (WASM GC)
- Native compilation option available for performance-critical applications
- WASM sandboxing provides security benefits
Funding & Future Development
- Chris Wanstrath funding full-time development
- Independent open source project
- Continued maintenance of test262 compatibility tracking
- Focus on expanding JS feature compatibility
- Plans for real-world application usage
Compatibility Status
- Early implementation of ES6 features
- Far from complete JS engine compatibility
- Progress comparable to Hermes but behind major engines
- Significant engineering effort required for full compatibility
- Feasible according to creator given their expertise
