# Sea of Nodes IR

**URL:** https://discourse.julialang.org/t/sea-of-nodes-ir/131171
**Category:** Offtopic
**Tags:** internals
**Created:** [July 29, 2025, 3:02pm UTC](https://discourse.julialang.org/t/sea-of-nodes-ir/131171 "2025-07-29T15:02:00Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![mrufsvold](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mrufsvold/32/31600_2.png) [@mrufsvold](https://discourse.julialang.org/u/mrufsvold)
#### Post date: [July 29, 2025, 3:02pm UTC](https://discourse.julialang.org/t/sea-of-nodes-ir/131171/1 "2025-07-29T15:02:00Z")

</div>

This is a very interesting talk on treeless parsing and IR. The first half about treeless parsing doesn’t apply to Julia what without user facing AST. However, the second half is about using a graph of nodes to represent the structure of the program instead of linear instructions. Optimizations are then applied as a series of graph substitutions and machine code is generated by walking the final graph.

I thought Julia internals nerds might enjoy

[![](https://global.discourse-cdn.com/julialang/original/3X/e/3/e3047ac574dcc348a60d7726a644d9a0e6c27ebd.jpeg "Sam H. Smith – Parsing without ASTs and Optimizing with Sea of Nodes – BSC 2025") ](https://www.youtube.com/watch?v=NxiKlnUtyio)

PS This comes from a new conference. The other talks on their channel have been very fun!

---

<div class="post-metadata">

### Author: ![Sukera](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sukera](https://discourse.julialang.org/u/Sukera)
#### Post date: [July 29, 2025, 3:26pm UTC](https://discourse.julialang.org/t/sea-of-nodes-ir/131171/2 "2025-07-29T15:26:06Z")

</div>

Perhaps relevant, but V8 (the JavaScript engine developed by Google) famously got rid of their Sea Of Nodes architecture:

> **[Land ahoy: leaving the Sea of Nodes · V8](https://v8.dev/blog/leaving-the-sea-of-nodes)**
>
> Why V8 decided to move away from Sea of Nodes and go back to CFG instead

My gut feeling is that in order to benefit from a Sea Of Nodes implementation, a language has to be designed with that in mind. Julia has quite a few things that make this challenging, like `@goto` (even in its limited form) due to being unstructured control flow.

---

<div class="post-metadata">

### Author: ![mrufsvold](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mrufsvold/32/31600_2.png) [@mrufsvold](https://discourse.julialang.org/u/mrufsvold)
#### Post date: [July 29, 2025, 3:39pm UTC](https://discourse.julialang.org/t/sea-of-nodes-ir/131171/3 "2025-07-29T15:39:51Z")

</div>

Nice to see a sneaking suspicion of my validated. As he goes through the talk, he starts to add a keep alive object, then control flow nodes, then memory nodes that keep orderedness… but it started to look like more and more of the graph was just a linked list.

The speaker is writing his own language, so I’m sure his language design is in dialog with his compiler design which sands off some of those rough edges.

---

<div class="post-metadata">

### Author: ![Sukera](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sukera](https://discourse.julialang.org/u/Sukera)
#### Post date: [July 29, 2025, 4:52pm UTC](https://discourse.julialang.org/t/sea-of-nodes-ir/131171/4 "2025-07-29T16:52:43Z")

</div>

Well, there’s that, but it’s also important that his entire goal was a single pass compiler without using a tree-like datastructure. So that’s probably something that influenced his design quite a lot! Since Julia, kind of by design, is not single pass, it’s even harder to justify moving to a Sea of Nodes IR.

---

<div class="post-metadata">

### Author: ![digital\_carver](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/digital_carver/32/33818_2.png) [@digital\_carver](https://discourse.julialang.org/u/digital_carver)
#### Post date: [July 30, 2025, 7:45am UTC](https://discourse.julialang.org/t/sea-of-nodes-ir/131171/5 "2025-07-30T07:45:26Z")

</div>

The general idea here vaguely reminded me of [Metatheory.jl](https://github.com/JuliaSymbolics/Metatheory.jl) and e-graph rewriting. Trying to find how they relate, I came across [this Q&A on StackExchange](https://langdev.stackexchange.com/q/2897) which seems to be a pretty nice (to my untrained eyes) high level overview.
