<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/static-roots-objects-with-compile-time-constant-addresses-v8-f9u7c9i0r" -->

---
title: Static Roots: Objects with Compile-Time Constant...
description: JavaScript objects like &#x27;undefined&#x27; and &#x27;true&#x27; are immovable immutable roots in V8 that have compile-time constant addresses. V8&#x27;s static roots feature allows...
canonical: https://daily.dev/posts/static-roots-objects-with-compile-time-constant-addresses-v8-f9u7c9i0r
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Static Roots: Objects with Compile-Time Constant Addresses · V8 | daily.dev
og:description: JavaScript objects like &#x27;undefined&#x27; and &#x27;true&#x27; are immovable immutable roots in V8 that have compile-time constant addresses. V8&#x27;s static roots feature allows...
og:url: https://daily.dev/posts/static-roots-objects-with-compile-time-constant-addresses-v8-f9u7c9i0r
og:image: https://api.daily.dev/og/posts/f9u7C9i0R.png
og:image:alt: Static Roots: Objects with Compile-Time Constant Addresses · V8
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Static Roots: Objects with Compile-Time Constant Addresses · V8

**[V8](https://daily.dev/sources/v8)** · 4 min read · 1 upvotes · 0 comments

## Summary

JavaScript objects like 'undefined' and 'true' are immovable immutable roots in V8 that have compile-time constant addresses. V8's static roots feature allows for quick access to these objects by guessing their memory addresses at compile time. The read-only heap containing these objects is created at compile time and loaded into memory when starting V8. Address prediction is made possible through pointer compression and deterministic creation of a bit identical read-only heap.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://v8.dev/blog/static-roots>

---

Tags: [#javascript](https://daily.dev/tags/javascript), [#performance](https://daily.dev/tags/performance), [#v8](https://daily.dev/tags/v8)

[View this post on daily.dev](https://daily.dev/posts/static-roots-objects-with-compile-time-constant-addresses-v8-f9u7c9i0r)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Static Roots: Objects with Compile-Time Constant Addresses · V8","url":"https://daily.dev/posts/static-roots-objects-with-compile-time-constant-addresses-v8-f9u7c9i0r","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/static-roots-objects-with-compile-time-constant-addresses-v8-f9u7c9i0r"},"datePublished":"2024-02-05T14:29:59.198Z","dateModified":"2024-05-09T08:29:02.242Z","description":"JavaScript objects like 'undefined' and 'true' are immovable immutable roots in V8 that have compile-time constant addresses. V8's static roots feature allows...","image":"https://media.daily.dev/image/upload/s--58gMhC4P--/f_auto/v1722860399/public/Placeholder%2012","thumbnailUrl":"https://media.daily.dev/image/upload/s--58gMhC4P--/f_auto/v1722860399/public/Placeholder%2012","isAccessibleForFree":true,"articleSection":"V8","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"V8","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/0cc7af7d23ee41d395473fd298dad108","url":"https://daily.dev/sources/v8"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/static-roots-objects-with-compile-time-constant-addresses-v8-f9u7c9i0r","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"javascript,performance,v8","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"V8","item":"https://daily.dev/sources/v8"},{"@type":"ListItem","position":3,"name":"Static Roots: Objects with Compile-Time Constant Addresses · V8"}]}
```

