<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/compile-time-improvements-in-llvm-23-zcyancxpy" -->

---
title: Compile-Time Improvements in LLVM 23 | daily.dev
description: LLVM 23 delivers a 6.75% average compile-time improvement (10.53% for sqlite3) in -O3 builds, driven by dozens of specific engineering changes: hash table...
canonical: https://daily.dev/posts/compile-time-improvements-in-llvm-23-zcyancxpy
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Compile-Time Improvements in LLVM 23 | daily.dev
og:description: LLVM 23 delivers a 6.75% average compile-time improvement (10.53% for sqlite3) in -O3 builds, driven by dozens of specific engineering changes: hash table...
og:url: https://daily.dev/posts/compile-time-improvements-in-llvm-23-zcyancxpy
og:image: https://api.daily.dev/og/posts/zcYAnCXPy.png
og:image:alt: Compile-Time Improvements in LLVM 23
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.

# Compile-Time Improvements in LLVM 23

**[Lobsters](https://daily.dev/sources/lobsters)** · 10 min read · 0 upvotes · 0 comments

## Summary

LLVM 23 delivers a 6.75% average compile-time improvement (10.53% for sqlite3) in -O3 builds, driven by dozens of specific engineering changes: hash table improvements (linear probing, compact bit arrays for DenseMap, xxh3 hashing), SmallVector push_back optimizations, dominator tree restructuring with bump allocation, faster successor/predecessor iteration via Use-based ranges, metadata storage overhauls, block-number-based analyses replacing pointer-keyed hash maps, GlobalISel -O0 improvements on AArch64, and a major build-time win from adopting precompiled headers (~45% faster LLVM/Clang builds). Shared-library startup costs from dynamic relocations and llvm::cl's global-constructor-based option parsing are also discussed as ongoing pain points, with a TableGen-based replacement planned for LLVM 24.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://aengelke.net/llvm23-ct.html>

## Questions this post answers

### How much faster does LLVM 23 compile compared to the previous version?

LLVM 23 is about 6.75% faster in -O3 stage2 compile-time builds, with sqlite3 specifically improving by 10.53%. Gains come from hash table rework (linear probing, compact bit arrays, xxh3 hashing), SmallVector push_back changes, dominator tree restructuring, faster successor/predecessor iteration, and metadata storage improvements, plus a separate ~45% build-time win from precompiled headers.

_Track LLVM's ongoing compile-time work on daily.dev before rolling the upgrade into your build pipeline._

### What are the downsides of building LLVM as a shared library instead of statically linked?

Building LLVM as a shared library reduces package size and build time but adds startup overhead from dynamic relocations processed at load time, especially for vtables and pointers to strings, and from llvm::cl's option parsing, where every option self-registers via a global constructor, causing many page faults during startup. LLVM 23 reduced these costs by shrinking .data.rel.ro/.data sections and cutting relocations.

_Compare static versus shared LLVM builds on daily.dev when tuning distribution packaging trade-offs._

### Why did LLVM switch basic block hash maps to using block numbers instead of block pointers?

Using block numbers instead of pointer-keyed hash maps removed the need for expensive ValueHandles that previously tracked basic block pointer reuse in BlockFrequencyInfo and BranchProbabilityInfo. Stable analysis block numbers, introduced starting in 2024, unblocked adoption in MemoryDependenceAnalysis, LoopInfo, LazyValueInfo, and post-order traversal, each yielding measurable compile-time reductions.

_Follow compiler internals like this on daily.dev when evaluating LLVM's evolving data structures._

## Similar posts on daily.dev

- [Leaving performance on the table](https://daily.dev/posts/leaving-performance-on-the-table-z6ieh43af) · Farid Zakaria’s Blog · 0 upvotes · 0 comments
- [This year in LLVM \(2025\)](https://daily.dev/posts/this-year-in-llvm-2025--o4ppqsnue) · Lobsters · 0 upvotes · 0 comments
- [Pre-Compiled Headers Being Debated For LLVM/Clang To Speed-Up Build By 1.5~2x](https://daily.dev/posts/pre-compiled-headers-being-debated-for-llvm-clang-to-speed-up-build-by-1-5-2x-3z6kdhqxq) · Phoronix · 0 upvotes · 0 comments
- [C\+\+ Performance Improvements in MSVC Build Tools v14.51](https://daily.dev/posts/c-performance-improvements-in-msvc-build-tools-v14-51-tagncfkv0) · DevBlogs · 1 upvotes · 0 comments

---

Tags: [#general-programming](https://daily.dev/tags/general-programming), [#data-structures](https://daily.dev/tags/data-structures), [#compiler-optimization](https://daily.dev/tags/compiler-optimization)

[View this post on daily.dev](https://daily.dev/posts/compile-time-improvements-in-llvm-23-zcyancxpy)

```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":"Compile-Time Improvements in LLVM 23","url":"https://daily.dev/posts/compile-time-improvements-in-llvm-23-zcyancxpy","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/compile-time-improvements-in-llvm-23-zcyancxpy"},"datePublished":"2026-08-22T20:29:50.687Z","dateModified":"2026-08-22T20:30:14.307Z","description":"LLVM 23 delivers a 6.75% average compile-time improvement (10.53% for sqlite3) in -O3 builds, driven by dozens of specific engineering changes: hash table...","image":"https://media.daily.dev/image/upload/s--HRgLpUt6--/f_auto/v1722860399/public/Placeholder%2003","thumbnailUrl":"https://media.daily.dev/image/upload/s--HRgLpUt6--/f_auto/v1722860399/public/Placeholder%2003","isAccessibleForFree":true,"articleSection":"Lobsters","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":"Lobsters","logo":"https://media.daily.dev/image/upload/s--tl8v_Fku--/f_auto,t_logo/v1698841318/logos/lobste.jpg","url":"https://daily.dev/sources/lobsters"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/compile-time-improvements-in-llvm-23-zcyancxpy","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"general-programming,data-structures,compiler-optimization","timeRequired":"PT10M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Lobsters","item":"https://daily.dev/sources/lobsters"},{"@type":"ListItem","position":3,"name":"Compile-Time Improvements in LLVM 23"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/compile-time-improvements-in-llvm-23-zcyancxpy#faq","mainEntity":[{"@type":"Question","name":"How much faster does LLVM 23 compile compared to the previous version?","acceptedAnswer":{"@type":"Answer","text":"LLVM 23 is about 6.75% faster in -O3 stage2 compile-time builds, with sqlite3 specifically improving by 10.53%. Gains come from hash table rework (linear probing, compact bit arrays, xxh3 hashing), SmallVector push_back changes, dominator tree restructuring, faster successor/predecessor iteration, and metadata storage improvements, plus a separate ~45% build-time win from precompiled headers. Track LLVM's ongoing compile-time work on daily.dev before rolling the upgrade into your build pipeline."}},{"@type":"Question","name":"What are the downsides of building LLVM as a shared library instead of statically linked?","acceptedAnswer":{"@type":"Answer","text":"Building LLVM as a shared library reduces package size and build time but adds startup overhead from dynamic relocations processed at load time, especially for vtables and pointers to strings, and from llvm::cl's option parsing, where every option self-registers via a global constructor, causing many page faults during startup. LLVM 23 reduced these costs by shrinking .data.rel.ro/.data sections and cutting relocations. Compare static versus shared LLVM builds on daily.dev when tuning distribution packaging trade-offs."}},{"@type":"Question","name":"Why did LLVM switch basic block hash maps to using block numbers instead of block pointers?","acceptedAnswer":{"@type":"Answer","text":"Using block numbers instead of pointer-keyed hash maps removed the need for expensive ValueHandles that previously tracked basic block pointer reuse in BlockFrequencyInfo and BranchProbabilityInfo. Stable analysis block numbers, introduced starting in 2024, unblocked adoption in MemoryDependenceAnalysis, LoopInfo, LazyValueInfo, and post-order traversal, each yielding measurable compile-time reductions. Follow compiler internals like this on daily.dev when evaluating LLVM's evolving data structures."}}]}
```

