Top all-time · #4084
Chris Fallin
Personal blog · cfallin.org/blog · on HN as cfallinprogrammingsystemsweb
Chris Fallin's personal blog at cfallin.org covers programming, systems and web. Since 2020, 18 different Hacker News readers have linked it 42 times, most often “Compilation of JavaScript to WASM, Part 3: Partial Evaluation”. It is still writing: the last post was on 2026-04-09, and you can follow it by feed.
Most-linked posts?
- Compilation of JavaScript to WASM, Part 3: Partial Evaluation5 people · 6 mentions · first linked 2024-08-28
- Cranelift, Part 2: Compiler Efficiency, CFGs, and a Branch Peephole Optimizer5 people · 5 mentions · first linked 2021-01-22
- Cranelift, Part 3: Correctness in Register Allocation4 people · 5 mentions · first linked 2021-03-15
- Faster JavaScript on WebAssembly: Portable Baseline Interpreter and Future Plans3 people · 4 mentions · first linked 2023-10-11
- Cranelift, Part 4: A New Register Allocator2 people · 3 mentions · first linked 2022-06-09
- /pubs/egraphs2023_aegraphs_slides.pdf2 people · 3 mentions · first linked 2024-03-19
- Cranelift's Instruction Selector DSL, Isle: Term-Rewriting Made Practical2 people · 2 mentions · first linked 2023-01-20
- Path Generics in Rust: A Sketch Proposal for Simplicity and Generality2 people · 2 mentions · first linked 2024-06-13
- A New Back End for Cranelift: Instruction Selection2 people · 2 mentions · first linked 2020-09-18
- The acyclic e-graph: Cranelift's mid-end optimizer2 people · 2 mentions · first linked 2026-04-10
What Hacker News says?
The approach that Cranelift uses is what we call the "aegraph" (talk I gave about it: slides https://cfallin.org/pubs/egraphs2023_aegraphs_slides.pdf , video https://vimeo.com/843540328 ). The basic idea is that eclasses hold sets of operator expressions (think sea-of-node IR), and we keep that alongside the CFG with a "skeleton" of side-effecting ops. We build that, do rewrites, then extract out of it back to a con…
Comment linking /pubs/egraphs2023_aegraphs_slides.pdf
on “Cranelift code generation comes to Rust”Submitted Cranelift, Part 4: A New Register Allocator as a story · 156 points
HN discussionWe actually take a fairly unconventional approach to e-graphs: we have a few linear passes and we do all rewrites eagerly, so we use them to provide a general framework for the fixpoint problem into which we plug in all our rewrites, but we don't have the usual "apply as much CPU time as you want to get better results" property of conventional equality saturation. I gave a talk about this approach, aegraphs (acyclic…
Comment linking /pubs/egraphs2023_aegraphs_slides.pdf
on “Cranelift code generation comes to Rust”Submitted Cranelift, Part 2: Compiler Efficiency, CFGs, and a Branch Peephole Optimizer as a story · 141 points
HN discussionRight, it's about algorithmic tradeoffs throughout. A good example I wrote about is here: https://cfallin.org/blog/2021/01/22/cranelift-isel-2/ where we use a single-pass algorithm to solve a problem that LLVM has a multi-part fixpoint loop to solve. Most CPU time during compile is in the register allocator and I took a really careful approach to optimization when I rewrote it a few years ago (more details https://c…
Comment linking /blog/2022/06/09/cranelift-regalloc2/
on “Cranelift code generation comes to Rust”Submitted A New Back End for Cranelift: Instruction Selection as a story · 108 points
HN discussionFor sure. And I do find https://cfallin.org/blog/2024/06/12/rust-path-generics , for example, interesting. It’s certainly not like what Rust does today is the only way things could ever be. Heck, I’m sad we never got elision on structs in 2018 like we were talking about.
Comment linking /blog/2024/06/12/rust-path-generics
on “Why Safety Profiles Failed”Submitted Cranelift, Part 3: Correctness in Register Allocation as a story · 101 points
HN discussionQuickJS and SpiderMonkey in WASM don't use JIT though - they're both just interpreters. WASM itself is often JIT'ed so a JS-to-WASM compiler that functions like the common JS baseline compilers would still get some benefit of JIT'ing even though the types available to the ICs in WASM may not be as useful as in JS. https://cfallin.org/blog/2023/10/11/spidermonkey-pbl/#future... has some interesting ideas on enabling…
Comment linking /blog/2023/10/11/spidermonkey-pbl/
on “LLRT: A low-latency JavaScript runtime from AWS”Submitted Compilation of JavaScript to WASM, Part 2: Ahead-of-Time vs. JIT as a story · 93 points
HN discussionCranelift's reason for using e-graphs is, in my view, that Rust sucks. Seriously. Consider the slides here, particularly slides 27-30: https://cfallin.org/pubs/egraphs2023_aegraphs_slides.pdf They show code for pattern matching IR in their Rust code, and it's awful . I think it's because they can't just have an IR with pointers, because that would violate Rust's rules. So, they need to call goofy helpers to deconstr…
Comment linking /pubs/egraphs2023_aegraphs_slides.pdf
on “Optimizers need a rethink”Submitted Cranelift, Part 2: Compiler Efficiency, CFGs, and a Branch Peephole Optimizer as a story · 14 points
HN discussionWe have already made big improvements in using SpiderMonkey on WASM, and have more work in progress that will enable SpiderMonkey to have "native"-like codegen for WASM: https://cfallin.org/blog/2023/10/11/spidermonkey-pbl/ An additional benefit of using a fast JS runtime inside of WASM, even on a WASM engine that natively supports JS, is to use a Wasm Component as a security boundary around JS code. This could be u…
Comment linking /blog/2023/10/11/spidermonkey-pbl/
on “WASI 0.2.0 and Why It Matters”Submitted Compilation of JavaScript to WASM, Part 3: Partial Evaluation as a story · 6 points
HN discussion> WASI-Preview2's benefits are not going to be realized in a browser, it's more for the non-web world The jco project ( https://github.com/BytecodeAlliance/jco ) provides an implementation of the Component Model and WASI Preview 2 for JavaScript systems. Right now, node.js support is complete, but support for Web embeddings is in progress and coming soon. > These interpreted languages can run in WASM, but only as la…
Comment linking /blog/2023/10/11/spidermonkey-pbl/
on “WASI 0.2.0 and Why It Matters”Submitted Compilation of JavaScript to WASM, Part 3: Partial Evaluation as a story · 4 points
HN discussionThose interested in this type of work can also visit https://cfallin.org/blog/2024/08/28/weval/ . The difference is that they use this technique to derive an AOT compiler.
Comment linking /blog/2024/08/28/weval/
on “Retrofitting JIT Compilers into C Interpreters”Submitted Compiling JavaScript to WASM: partial evaluation, weval, and the first Futamura as a story · 4 points
HN discussionZig did go on to apply the same style to their two later IRs, ZIR ( https://github.com/ziglang/zig/pull/8266 ) and AIR ( https://github.com/ziglang/zig/pull/9353 ). These don't look as thoroughly benchmarked (at least not on the PRs) but it looks like they got significant wins there as well. Of course Zig is a very different language and its compiler handles a rather different workload. It's totally possible that th…
Comment linking /blog/2022/06/09/cranelift-regalloc2/
on “How to speed up the Rust compiler in August 2023”Submitted Cranelift, Part 3: Correctness in Register Allocation as a story · 4 points
HN discussionSubmitted Compiling JavaScript to Wasm: partial evaluation and the 1st Futamura projection as a story · 3 points
HN discussionSubmitted Cranelift, Part 3: Correctness in Register Allocation as a story · 3 points
HN discussionSubmitted A New Backend for Cranelift, Part 1: Instruction Selection as a story · 3 points
HN discussionSubmitted Exceptions in Cranelift and Wasmtime as a story · 2 points
HN discussionSubmitted Correct register allocation in Cranelift by fuzzing with a symbolic checker as a story · 2 points
HN discussionSubmitted Path Generics in Rust: A Sketch Proposal for Simplicity and Generality as a story · 2 points
HN discussionSubmitted Faster JavaScript on WebAssembly: Portable Baseline Interpreter and Future Plans as a story · 2 points
HN discussionSubmitted Correctness in Register Allocation: Fuzzing with a Symbolic Checker as a story · 2 points
HN discussionSubmitted Cranelift, Part 2: Compiler Efficiency, CFGs, and a Branch Peephole Optimizer as a story · 2 points
HN discussionSubmitted The acyclic e-graph: Cranelift's mid-end optimizer as a story · 1 points
HN discussion