solx 0.1.2 targets binary size — cutting deployment costs and fitting more contracts under Ethereum’s 24 kB limit — without sacrificing gas efficiency or compile time. That focus turns into:
Smaller binaries without losing gas efficiency. Contracts compiled with --via-ir
are 13% smaller on median vs 0.1.1, and about 22% smaller than solc 0.8.30 –via-ir
.
More often under the 24 KB limit. If a contract would exceed the cap, solx 0.1.2 optimizes for size more aggressively to make a contract deployable (PR-854).
Better code quality. The compiler now eliminates unused stores (heap, transient, or persistent storage) (PR-865) and generates more efficient conditional jumps (PR-870).
Improved tooling support. Integration with Hardhat v3 is now smoother out of the box.
This post walks through the current results and explains the optimizations in detail.
--via-ir
in Every Non-Functional Metricsolx 0.1.2 remains in beta. It passes the full Solidity test suite, internal tests, and 24 real-world Hardhat/Foundry projects (e.g., Uniswap V4, Aave V3, Solady, Beefy, Lens). Code coverage is tracked; PRs that reduce it are not accepted.
QA is sufficient for development use — some teams already build with solx. Deploying non-mission-critical contracts is also viable today.
Raw benchmarking data is available in the solx 0.1.2 release PR. The subsections below provide a summary view and key highlights from that data.
solx 0.1.2 reduces contract size across both the --via-ir
and default pipelines. Like solc, it still uses the legacy pipeline by default.
The table below shows the relative runtime size improvements compared to solx 0.1.1 and solc 0.8.30 (negative values indicate smaller size, i.e., better).
Despite a clear median win, the odds that a specific contract ends up smaller still slightly favor solc --via-ir
. The measurement includes all artifacts produced by a foundry build
.
The data shows considerable variation in whether a given contract compiles smaller with solc or solx; however, when solx wins, the margin is typically larger. The table below samples real-world contracts to show you how it looks in practice.
The average gas metric remained stable in solx 0.1.2: the gas-for-size tradeoffs were offset by other optimizations introduced in this release.
The table below compares solx 0.1.2 against solx 0.1.1 and solc 0.8.30, showing relative gas changes (negative values indicate reduced gas usage, i.e., better).
The table below also shows the likelihood that a given test consumes less gas with solx 0.1.2 compared to solx 0.1.1 and solc 0.8.30.
solx 0.1.2 doesn’t introduce pipeline changes, so compilation time remains similar to solx 0.1.1.
The table below shows how long each test run takes on our CI hardware (in seconds), comparing against solc 0.8.30 (both default and --via-ir
).
The earlier sections focused on what solx 0.1.2 achieved — smaller contracts, same or better gas usage. This section explains how we got there.
Three new optimizations made this possible:
The Constant Unfolder now splits PUSHN
into multiple instructions if it reduces total bytecode size by at least 2.5× and fits within 4 instructions. Once the 24 kB limit is hit, it unfolds for any size reduction — prioritizing code outside of loops first, then loops of nesting depth 1, then 2, and so on. This acts as a hot/cold code heuristic to preserve performance while keeping contracts deployable.
The Dead Store Elimination pass can now remove not only overwritten stores to memory and storage, but also accounts for contract termination scenarios like return
and revert
. In solx 0.1.2
, the common free heap pointer initialization (PUSH1 0x40 PUSH1 0x80 MSTORE
) is eliminated from runtime code when unused (see example in Compiler Explorer). On the main branch, it's also removed from deployment code.
The Peephole Optimizer now emits more efficient code for conditional jumps involving OR
conditions.
Starting with Hardhat v3.0.5, it’s now much easier to use solx in Hardhat.
To get started, just specify the following in your hardhat.config.ts
:
solidity: {
profiles: {
default: {
version: "0.8.28",
path: "./path/to/solx",
},
},
},
You can find a detailed guide in the Hardhat documentation.
solx 0.1.2 also resolves a key integration issue by producing all the artifacts required by Ethereum Developer Runtime (PR #133).
Considering non-functional metrics alone, solx
now leads across the board — except for default-pipeline compile time, where solc
remains faster. We expect the upcoming MLIR pipeline to close this final gap (learn more about it in the X thread). With performance largely handled, our focus is shifting toward functional gaps — starting with debugging support, which is now our top priority.
If you’ve read this far, chances are you care about solx
. If you haven’t already, join our Telegram group and tell us more about your use case. Your input helps us prioritize wisely — especially as we move beyond optimization and work to make solx
a first-class development experience.