Ghostboard pixel

Wow! This New Open Source Compiler is 20 Times Faster Than LLVM

A new compiler backend framework focused on faster code generation appears.

a concept illustration to show what tpde signifies

A key part of turning human-written code into machine instructions (something computers can actually run) is handled by a compiler backend. This is where high-level code is converted into low-level machine instructions, which are binary operations a CPU understands.

For years, LLVM has been the go-to tool for this job, with its backend powering languages and compilers like Clang, Rust, Swift, Julia, and even parts of Haskell.

But now, there's a new kid on the block, TPDE, which is designed to be faster and simpler, challenging LLVM's dominance in the space.

What to Expect with TPDE?

screenshot of the tpde github repository
TPDE's GitHub repository.

Three researchers from the Technical University of Munich have developed TPDE, a new compiler backend framework designed to generate machine code significantly faster than existing solutions.

It focuses on generating machine code quickly and efficiently by combining multiple backend tasks, such as instruction selection, register allocation, and encoding, into a single pass.

This streamlined approach allows TPDE to compile code up to 8 to 24 times faster than LLVM on certain workloads, especially in just-in-time (JIT) compilation scenarios like database queries and WebAssembly.

Their technical paper mentions the following:

Our LLVM back-end targets x86-64 and AArch64 and consists of less than 8k lines of code. Performance results evaluating the SPEC CPU2017 benchmarks show that our back-end is 8–24x faster than LLVM’s compile-time-focused -O0 pipeline while achieving similar run-time performance of the generated code (±9%).

All of this happens behind the scenes, thanks to a lean, two-pass system that skips much of the heavy lifting found in traditional backends.

Currently, TPDE supports popular CPU architectures like x86-64 and ARM64 (Armv8.1), making it suitable for a wide range of modern devices, from desktop/laptop computers to mobile and server environments.

If you’re interested, you can explore the technical paper and the project’s GitHub repository to learn more.

Via: Phoronix

It's FOSS turns 13! 13 years of helping people use Linux ❤️

And we need your help to go on for 13 more years. Support us with a Plus membership and enjoy an ad-free reading experience and get a Linux eBook for free.

To celebrate 13 years of It's FOSS, we have a lifetime membership option with reduced pricing of just $76. This is valid until 25th June only.

If you ever wanted to appreciate our work with Plus membership but didn't like the recurring subscription, this is your chance 😃

Get Lifetime Membership of It's FOSS

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to It's FOSS News.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.