---
title: "Giving V8 a Heads-Up: Faster JavaScript Startup with Explicit Compile Hints"
description: "Chrome 136 ships Explicit Compile Hints, which let developers mark a JavaScript file for eager compilation by placing the magic comment `//# allFunctionsCalledOnLoad` at the top."
url: "https://swe.quest/articles/giving-v8-a-heads-up-faster-javascript-startup-with-explicit-compile-hints-dd239c9384ec103b"
canonical: "https://v8.dev/blog/explicit-compile-hints"
source: "V8"
published: "2025-04-29"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 3
tags: ["runtimes","web-performance","javascript","browsers"]
---

# Giving V8 a Heads-Up: Faster JavaScript Startup with Explicit Compile Hints

A post on [V8](https://swe.quest/sources/v8.md), published 2025-04-29, 3 min read, Announcement. Original: [https://v8.dev/blog/explicit-compile-hints](https://v8.dev/blog/explicit-compile-hints)

## Summary

Chrome 136 ships Explicit Compile Hints, which let developers mark a JavaScript file for eager compilation by placing the magic comment \`//# allFunctionsCalledOnLoad\` at the top. Eager compilation avoids a duplicate lightweight-then-full parse and moves compile work onto a background thread interleaved with network loading, instead of blocking the main thread on first call. In V8's experiment, 17 of 20 popular pages improved, with an average 630 ms reduction in foreground parse and compile time. Apply it sparingly to a core file because over-compiling costs time and memory, and verify the effect with \`--log-function\_events\`. Per-function hints are planned.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Runtimes & VMs](https://swe.quest/tags/runtimes.md) (Compilers & runtimes)
- [Web performance](https://swe.quest/tags/web-performance.md) (Web & mobile)
- [JavaScript](https://swe.quest/tags/javascript.md) (Languages)
- [Browsers](https://swe.quest/tags/browsers.md) (Web & mobile)

## Prerequisites

- JavaScript basics ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))
- lazy vs eager compilation

## Keywords

V8, Explicit Compile Hints, Chrome 136, allFunctionsCalledOnLoad

## Related posts

- [Bun v1.3.9](https://swe.quest/articles/bun-v1-3-9-b7a8e766ebce7857.md): Bun · 2026-02-08 · Medium · 8 min read · JavaScript, Runtimes & VMs, Performance engineering, Compilers
  Bun v1.3.9 adds \`bun run --parallel\` and \`--sequential\` for running package.json scripts with prefixed output across workspaces, along with Node-compatible HTTP/2 connection upgrades via \`net.Server\`, \`Symbol.dispose\` support for test mocks, \`NO\_PROXY\` handling for explicit proxies, \`--cpu-prof-interval\`, and ESM bytecode in \`--compile\`.
- [V8 release v6.9 · V8](https://swe.quest/articles/v8-release-v6-9-v8-d0efd26e2594b2df.md): V8 · 2018-08-07 · Easy · 4 min read · Runtimes & VMs, JavaScript, Memory management, WebAssembly, Compilers
  V8 v6.9 embeds built-in functions directly into the binary on x64, so all Isolates share one copy instead of each holding up to 700 KB on its own heap.
- [Speculative Optimizations for WebAssembly using Deopts and Inlining](https://swe.quest/articles/speculative-optimizations-for-webassembly-using-deopts-and-inlining-bb89e7c53ac7945f.md): V8 · 2025-06-24 · Hard · 17 min read · WebAssembly, Compilers, Runtimes & VMs, Performance engineering
  V8 in Chrome M137 adds speculative call\_indirect inlining and deoptimization support for WebAssembly, using runtime call-target feedback gathered by the Liftoff baseline compiler so TurboFan can inline up to four likely callees behind cheap instance and target checks.
- [Adding the V8 CPU Profiler to v8go](https://swe.quest/articles/adding-the-v8-cpu-profiler-to-v8go-57f5c1c58134c15f.md): Shopify Engineering · 2022-03-04 · Medium · 10 min read · Go, Performance engineering, API design, Runtimes & VMs, JavaScript
  Exposing V8's CPU profiler through v8go, the Go library for running JavaScript in V8 isolates via Cgo, came down to a choice between lazily fetching each profile node property with its own Cgo call or eagerly building the whole call tree in C++ and rebuilding it in Go from a single pointer.
- [Land ahoy: leaving the Sea of Nodes](https://swe.quest/articles/land-ahoy-leaving-the-sea-of-nodes-b461320cb50dc764.md): V8 · 2025-03-25 · Hard · 25 min read · Compilers, Runtimes & VMs, JavaScript, WebAssembly
  V8 is replacing Sea of Nodes in its Turbofan optimizing compiler with Turboshaft, a traditional control-flow-graph IR.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
