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?
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
From It's FOSS News via this RSS feed