# Land ahoy: leaving the Sea of Nodes

DevFeed: [Land ahoy: leaving the Sea of Nodes](<https://devfeed.tech/articles/land-ahoy-leaving-the-sea-of-nodes-3529.md>)

Original publisher: [Read original article](<https://v8.dev/blog/leaving-the-sea-of-nodes>)

Author: Darius Mercadier

Published: 2025-03-25T00:00:00Z

Content type: article

Language: en

Sources: [V8](<https://devfeed.tech/sources/v8.md>)

Topics: [Compiler](<https://devfeed.tech/topics/compiler.md>), [V8](<https://devfeed.tech/topics/v8.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [WebAssembly](<https://devfeed.tech/topics/web-assembly.md>), [Graphs](<https://devfeed.tech/topics/graphs.md>)

Tags: [architectures](<https://devfeed.tech/tags/architectures.md>), [asm](<https://devfeed.tech/tags/asm.md>), [blog-post](<https://devfeed.tech/tags/blog-post.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [internals](<https://devfeed.tech/tags/internals.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [performance](<https://devfeed.tech/tags/performance.md>), [technical](<https://devfeed.tech/tags/technical.md>), [webassembly](<https://devfeed.tech/tags/webassembly.md>)

## AI overview

This V8 developer article explains the project's move away from the Sea of Nodes intermediate representation toward the more traditional Control-Flow Graph representation used by Turboshaft. It describes the migration status across the JavaScript and WebAssembly compiler pipelines and introduces the historical limitations and technical debt associated with Crankshaft.

## Source excerpt

V8's end-tier optimizing compiler, Turbofan, is famously one of the few large-scale production compilers to use Sea of Nodes (SoN). However, since almost 3 years ago, we've started to get rid of Sea of Nodes and fall back to a more traditional Control-Flow Graph (CFG) Intermediate Representation (IR), which we named Turboshaft. By now, the whole JavaScript backend of Turbofan uses Turboshaft instead, and WebAssembly uses Turboshaft throughout its whole pipeline. Two parts of Turbofan still use some Sea of Nodes: the builtin pipeline, which we're slowly replacing by Turboshaft, and the frontend of the JavaScript pipeline, which we're replacing by Maglev, another CFG-based IR. This blog post explains the reasons that led us to move away from Sea of Nodes. The birth of Turbofan and Sea of Nodes # 12 years ago, in 2013, V8 had a single optimizing compiler: Crankshaft. It was using a Control-Flow Graph based Intermediate Representation. The initial version of Crankshaft provided significant performance improvements despite still being quite limited in what it supported. Over the next few years, the team kept improving it to generate even faster code in ever more situations. However, technical debt was starting to stack up and a number of issues were arising with Crankshaft: It contained too much hand-written assembly code. Every time a new operator was added to the IR, its translation to assembly had to be manually written for the four architectures officially supported by V8 (x64, ia32, arm, arm64). It struggled with optimizing asm.js, which was back then seen as an important step towards high-performance JavaScript. It didn't allow introducing control flow in lowerings. Put otherwise, control flow was created at graph building time, and was then final. This was a major limitation, given that a common thing to do when writing compilers is to start with high-level operations, and then lower them to low-level operations, often by introducing additional control flow. Consi