Odin compiles 1M lines in 1s

crowdyriver2 pts1 comments

GitHub - guillemus/odin-1-million-lines-of-code-bench: A one-million-line synthetic Odin project for measuring development build performance · GitHub

/" data-turbo-transient="true" />

Skip to content

Search or jump to...

Search code, repositories, users, issues, pull requests...

-->

Search

Clear

Search syntax tips

Provide feedback

--><br>We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Cancel

Submit feedback

Saved searches

Use saved searches to filter your results more quickly

-->

Name

Query

To see all available qualifiers, see our documentation.

Cancel

Create saved search

Sign in

/;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up

Appearance settings

Resetting focus

You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.

Dismiss alert

{{ message }}

guillemus

odin-1-million-lines-of-code-bench

Public

Notifications<br>You must be signed in to change notification settings

Fork

Star

main

BranchesTags

Go to file

CodeOpen more actions menu

Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit

History<br>1 Commit<br>1 Commit

app-debug.dSYM/Contents

app-debug.dSYM/Contents

src

src

.gitignore

.gitignore

README.md

README.md

generate.py

generate.py

View all files

Repository files navigation

Odin 1 Million Lines of Code Benchmark

A synthetic Odin project containing approximately one million lines of ordinary application-style code. It is intended to measure full development-build throughput rather than optimized release compilation.

Project shape

1,014,006 physical lines of Odin

40,000 reachable and emitted processing procedures

100 packages connected in a dependency chain

1,201 Odin source files

Roughly 27.5 MB of source

The generated code uses structs, enums, fixed arrays, pointers, loops, conditionals, switches, state transitions, validation, aggregation, and cross-package calls. It deliberately avoids pathological compiler stress tests and heavy metaprogramming.

This is still synthetic code. It is more representative than line padding or thousands of trivial arithmetic functions, but it cannot predict every real project's build time.

Generate

The generated source is committed to the repository. To recreate it deterministically:

python3 generate.py

Build

mkdir -p build<br>time odin build src/main \<br>-collection:bench=src/packages \<br>-out:build/bench

For a build with debug information:

mkdir -p build<br>time odin build src/main \<br>-collection:bench=src/packages \<br>-out:build/bench-debug \<br>-debug

Add -show-timings to see Odin's parsing, type-checking, LLVM code-generation, and linking breakdown.

Reference result

Measured with Odin dev-2026-06:285f6d87b on an Apple M4 Pro with 14 CPU cores and 24 GB RAM:

Build<br>Median wall time

Default (-o:minimal)<br>1.10 s

Default after touching one source file<br>1.11 s

Debug (-debug, which uses -o:none)<br>1.79 s

Seven warm runs were used for the default-build median and three for the debug-build median. Odin performed a full build each time; this benchmark does not rely on incremental compilation. The default executable contained all 40,000 generated process_* symbols.

About<br>A one-million-line synthetic Odin project for measuring development build performance<br>Resources<br>Readme<br>Activity<br>Stars<br>0 stars<br>Watchers<br>0 watching<br>Forks<br>0 forks<br>Report repository

Releases

Packages

Contributors

Languages

You can’t perform that action at this time.

build odin code debug lines million

Related Articles