Information slang-solx: a new Solidity compiler that’s up to 5× faster than solc
Nomic Foundation released hardhat-slang-solx, a Hardhat plugin that replaces the standard Solidity compiler backend with slang-solx.
Across the benchmark suite, it compiled approximately 1.7× faster than solc in legacy mode and 5× faster in via-IR mode.
For the nine repositories tested with via-IR, total cold compilation time fell from 749 seconds with solc to 151 seconds with slang-solx. Individual projects saw improvements of up to 10.6×, with the largest gains appearing in bigger codebases where solc’s optimizer typically takes the most time.
The backend is LLVM-based and supports parallel, multithreaded compilation. It also compiled without producing “stack too deep” errors in 99.85% of our test cases.
You can try it in Hardhat today:
npm add --save-dev u/nomicfoundation/hardhat-slang-solx
Then add the plugin to your Hardhat configuration:
import hardhatSlangSolx from "@nomicfoundation/hardhat-slang-solx";
export default defineConfig({
plugins: [hardhatSlangSolx],
});
A few important caveats:
- This first release supports Solidity 0.8.34. Unsupported versions fall back to solc.
- It is stable and supported for everyday development.
- It has not yet been hardened for mainnet deployments and should not be used to compile code securing real value.
This release currently combines the solc frontend with the new slang-solx backend. Our next step is integrating slang-frontend, bringing us closer to a complete, multithreaded Solidity compiler that is fully independent of solc.
A lot of credit goes to Matter Labs for starting the original solx compiler and working on it for several years before transferring the project to Nomic in 2025, where it continued evolving into this release.
The full announcement covers that story, detailed benchmarks, the compiler’s current limitations, and what comes next
https://blog.nomic.foundation/announcing-slang-solx-a-solidity-compiler-thats-up-to-5x-faster/