Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
cfallin
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
by
cfallin
5mo ago
Oh goodness, that name is so good! (And thanks!)
2.
▲
by
cfallin
5mo ago
Thanks! I haven't studied Graal's IR in detail, no. I'll add it to my reading list...
3.
▲
by
cfallin
5mo ago
OK, cool. I was assuming "escape analysis and type inference" implied a JS JIT -- straight from your comment, no other assumptions intended. But you've got a lot of interesting experience here and thanks for your thoughts. Al
4.
▲
by
cfallin
5mo ago
Hi Fil -- thanks for the comment! I think we may be playing in slightly different spaces: unlike a JS JIT, Cranelift doesn't have "super fancy escape/type analysis". We're really targeting the core optimizations (GV
5.
▲
by
cfallin
9mo ago
We have two: fuel and epochs. Fuel (analogous to "gas" as it appears in many VM platforms) is a deterministic count and epochs check an always-increasing counter in shared memory meant to be periodically bumped by another thread.
6.
▲
Exceptions in Cranelift and Wasmtime
(cfallin.org)
2 points
by
cfallin
11mo ago
|
0 comments
7.
▲
by
cfallin
1y ago
No, it's still behind a flag (and so transitively, exceptions are too, because we built exception objects on top of GC). Our docs ( https://docs.wasmtime.dev/stability-tiers.html ) put GC at tier 2 with reason "prod
8.
▲
by
cfallin
1y ago
> It'll be interesting to see what the second non-browser-based WASM runtime to fully support 3.0 will be (I'm guessing wasmtime will be first; ...) Wasmtime already supports every major feature in the Wasm 3.0 release, I belie
9.
▲
by
cfallin
1y ago
They're hitting another design point on the compile time vs. code-quality tradeoff curve, which is interesting. They compile 4.27x faster than Cranelift with default (higher quality) regalloc, but Cranelift produces code that runs 1.64
10.
▲
Compilation of JavaScript to WASM, Part 3: Partial Evaluation
(cfallin.org)
6 points
by
cfallin
2y ago
|
1 comments
11.
▲
Compilation of JavaScript to WASM, Part 2: Ahead-of-Time vs. JIT
(cfallin.org)
93 points
by
cfallin
2y ago
|
8 comments
12.
▲
by
cfallin
2y ago
Indeed; the tl;dr is "yes it works on SpiderMonkey, and was designed to do so". Blog post in a few months, I promise!
13.
▲
by
cfallin
2y ago
> That is, if x and y are determined only at runtime for power(x, y) then I don't see what can be optimized. Yes, the example in Max's post is specifically assuming one wants to generate a specialized version of `power` where `
14.
▲
by
cfallin
2y ago
This is indeed a good point and something I want to write about when I eventually do a blog post on weval. A few counterpoints that I'd offer (and what led me to still take this approach): - If the target has sub-par debugging infrastr
15.
▲
by
cfallin
2y ago
weval author here (thanks Max for the blog post!). Also AMA! The talk about weval that Max mentions was at NEU and also CMU; the latter was recorded and is here: https://vimeo.com/940568191 I also plan to write up a blog po
16.
▲
by
cfallin
2y ago
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
17.
▲
by
cfallin
2y ago
We 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
18.
▲
by
cfallin
2y ago
Right, 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 p
19.
▲
by
cfallin
2y ago
There are some benchmarks of Cranelift-based Wasm VMs (Wasmtime) vs. LLVM-based Wasm VMs here: https://00f.net/2023/01/04/webassembly-benchmark-2023/ The (perhaps slightly exaggerated but encouraging to
20.
▲
Faster JavaScript on WebAssembly: Portable Baseline Interpreter and Future Plans
(cfallin.org)
4 points
by
cfallin
3y ago
|
0 comments
21.
▲
by
cfallin
3y ago
A small correction re: Cranelift -- I had originally prototyped with egg, but we're currently using a variant of egraphs I invented called "acyclic egraphs" after working through performance and productionization issues, with
22.
▲
Cranelift's Instruction Selector DSL, Isle: Term-Rewriting Made Practical
(cfallin.org)
2 points
by
cfallin
4y ago
|
0 comments
23.
▲
Cranelift Progress in 2022
(bytecodealliance.org)
21 points
by
cfallin
4y ago
|
1 comments
24.
▲
by
cfallin
4y ago
The perf blogpost actually uses SpiderMonkey-compiled-to-Wasm as a benchmark rather than a comparison (peer) of Wasmtime. However, there are some good comparisons done by a third party in this paper: https://arxiv.org/pdf&
25.
▲
by
cfallin
4y ago
That's a good question for bjorn3, the leader of that effort; they periodically publish status updates. Over on the Reddit discussion someone pointed to this GitHub issue too: https://github.com/rust-lang/rust/
26.
▲
by
cfallin
4y ago
That's the goal at least! We explicitly do not have a notion of "undef" or "poison" values in our IR, and to the largest degree possible we want determinism (modulo e.g. some NaN-related stuff right now). Our curren
27.
▲
by
cfallin
4y ago
One can do optimal regalloc over SSA if one doesn't have to spill, or split to make the spilling better, but spilling and splitting are the most interesting and relevant part of practical register allocation -- so in practice this isn&
28.
▲
by
cfallin
4y ago
Cranelift is a general-purpose compiler like LLVM is, but its goals are different: it is targeted toward applications like JITs where faster compilation is important. It is intended to be a peer of browser JITs' optimizing tiers. In ou
29.
▲
Cranelift, Part 4: A New Register Allocator
(cfallin.org)
156 points
by
cfallin
4y ago
|
16 comments
30.
▲
by
cfallin
4y ago
Ah, yes, that is indeed experimental, though it seems to be coming along nicely (I'm not involved but talk with the main author to support it).
More ›