Jda Programming Language - opensource compiler ai faster
by•
A self-hosted systems programming language built from scratch — zero C, zero Rust. Bootstrapped from assembly.
Replies
Best
Maker
📌
So I had a slightly unreasonable idea two years ago:
What if I built a programming language without depending on C, LLVM, or any existing toolchain?
The result is Jda — a high-performance systems language bootstrapped from raw x86-64 assembly. The compiler now compiles itself. No GC. No runtime. Single static binaries.
And on real benchmarks, it’s doing things I genuinely didn’t expect.
The numbers that made me double-check
I ran a 6-language benchmark suite (C, Rust, Go, Jda, Python, Ruby) on real algorithms — not microbenchmarks.
• Sudoku (500 puzzles): C 62ms, Rust 62ms, Go 66ms, Jda 41ms
• LZ77 (1 MB compress): C 1,830ms, Rust 2,185ms, Go 2,721ms, Jda 277ms
That’s 1.5× faster than C on Sudoku and 6.6× faster than C on LZ77. Running via Rosetta 2, no less — C/Rust/Go were native ARM64, Jda was x86-64 emulated.
How? Source-level optimizations the C compiler can’t easily do: MOD→AND strength reduction, hash-chain hoisting, aggressive DCE.
Compile times are kinda absurd too
33× faster compilation than Rust, 16× faster than Go. Skipping LLVM saves a lot of time.
A taste of the syntax
`fn search_file(path: &i8, pattern: &i8) -> i64 {
let fd = file_open(path, 0)
let buf = file_read_all(fd)
let matches = 0
for i in range(str_len(buf)) {
if substr_match(buf, i, pattern) {
matches += 1
}
}
ret matches
}`
A real ripgrep-style search tool, ~400 lines total, compiles to a 1 MB static binary with zero dependencies.
What’s in the box
• Self-hosted compiler — byte-identical fixed point reached April 2026
• 117 stdlib packages — HTTP, JSON, crypto, tensors, neural networks
• Built-in concurrency — goroutine-style green threads, no GC
• 388 conformance tests passing
• Native installers for Windows, macOS, Linux
Try it
Repo: https://www.github.com/jdalang/j...
Happy to answer questions about the bootstrap process, the codegen, or why on earth I did this in the comments.
@jailalawat Those benchmark numbers are genuinely impressive, especially the LZ77 result. The source-level optimizations you mentioned (MOD→AND reduction, hash-chain hoisting) are the kind of thing that usually requires manual tuning in C — interesting that you're baking them into the compiler itself. How are you deciding which optimizations to apply without explicit hints from the programmer?
Right now the compiler applies optimisations automatically based on
patterns it recognises — no hints needed from the programmer.
MOD→AND fires whenever the divisor is a power of two (like % 4096).
LICM hoists any expression out of a loop if it doesn't change between
iterations. The compiler detects these patterns during the JIR
(intermediate representation) pass before emitting machine code.
The goal is that you write clean, readable code and the compiler finds
the fast version for you. Same idea as what gcc/clang do, just with
different pattern recognition — and apparently more aggressive on these
specific cases.
More optimisations are coming. The benchmark gaps you see today are
with a pretty young compiler — lots of headroom left.
Report
This is SO COOL! I'll definitely have to try it out myself. The syntax looks very intuitive. As impressive as this is, though, I do have to ask... what gave you the idea to make this? Was it just curiosity, trying to push your skills to the limit?
Report
Maker
Thank you @jboktor Really glad the syntax feels intuitive — that was
important to get right.
Honestly it started as a question: can you build a real compiler from
nothing, with no existing language in the toolchain? No C, no Rust,
just raw assembly at the bottom. Curiosity more than anything.
But once it started working the question became — how fast can it
actually get? The LZ77 result (6.6× faster than C) surprised even me.
That's when it stopped being just a learning project and started feeling
like something worth sharing.
So yes — curiosity first, then the benchmarks kept pulling me forward.
Hope you enjoy trying it out! Drop any feedback here when you do. 🙏
Replies
RiteKit Company Logo API
@jailalawat Those benchmark numbers are genuinely impressive, especially the LZ77 result. The source-level optimizations you mentioned (MOD→AND reduction, hash-chain hoisting) are the kind of thing that usually requires manual tuning in C — interesting that you're baking them into the compiler itself. How are you deciding which optimizations to apply without explicit hints from the programmer?
Thanks @saulfleischman.
Right now the compiler applies optimisations automatically based on
patterns it recognises — no hints needed from the programmer.
MOD→AND fires whenever the divisor is a power of two (like % 4096).
LICM hoists any expression out of a loop if it doesn't change between
iterations. The compiler detects these patterns during the JIR
(intermediate representation) pass before emitting machine code.
The goal is that you write clean, readable code and the compiler finds
the fast version for you. Same idea as what gcc/clang do, just with
different pattern recognition — and apparently more aggressive on these
specific cases.
More optimisations are coming. The benchmark gaps you see today are
with a pretty young compiler — lots of headroom left.
This is SO COOL! I'll definitely have to try it out myself. The syntax looks very intuitive. As impressive as this is, though, I do have to ask... what gave you the idea to make this? Was it just curiosity, trying to push your skills to the limit?
Thank you @jboktor Really glad the syntax feels intuitive — that was
important to get right.
Honestly it started as a question: can you build a real compiler from
nothing, with no existing language in the toolchain? No C, no Rust,
just raw assembly at the bottom. Curiosity more than anything.
But once it started working the question became — how fast can it
actually get? The LZ77 result (6.6× faster than C) surprised even me.
That's when it stopped being just a learning project and started feeling
like something worth sharing.
So yes — curiosity first, then the benchmarks kept pulling me forward.
Hope you enjoy trying it out! Drop any feedback here when you do. 🙏