porffor is a new ahead-of-time compiler for javascript
juicy numbers (output size, mean runtime, mean rss)
hi_bun
97M 55ms 75MBhi_deno
100M 16ms 31MBhi_porffor
20K <1ms 1.4MBhi_javy
1.3M - - (javy is a js to wasm compiler)hi_porffor_wasm
4.0K - -- no benchmark demo for the last two bc wasm is hard to run server-side (for now)
- no benchmark demo for quickjs, another ahead-of-time compiler?
github canadahonk/porffor
- porffor is completely written in ts/js, for better or worse
current limitations
- with is a no-op for now
- eval is unsupported for now - it’s possible but annoying to impl
- takes advantage typescript type annotations
- no gc or fancy allocator - best for short-running use cases like aws lambda
impl challenges
- things that are inexplicably underspecified, like Date.parse() or Array#sort()
- runtime code evaulation (as above) - would need to ship a mini engine in output
- optimising prototypes without breaking shit