All notable changes in program binary size will be documented in this file.
The changes are calculated by comparing the current results with the last version's results. Increase in size is shown with 🔴 and decrease is shown with 🟢.
The programs and their tests are located in /tests/bench.
Note Results documented in this file are autogenerated. Running the tests will update the current results when necessary, manually editing the results should be avoided.
Warning Results may vary depending on Solana version.
Solana version: 2.1.0
Program | Binary Size | - |
---|---|---|
bench | 1,041,928 | 🔴 +250,920 (31.72%) |
- lang: Use closures for
init
constraints to reduce the stack usage oftry_accounts
. Note that the binary size increase is exaggerated for the bench program because it uses unusual number ofinit
constraints. Impact for normal programs will be a lot less severe. (#2939). - Upgrade to Solana
2.1.0
. This upgrade decreased the binary size ~5% (55,000 bytes) (#3339).
Solana version: 1.18.17
Program | Binary Size | - |
---|---|---|
bench | 791,008 | - |
Solana version: 1.18.8
Program | Binary Size | - |
---|---|---|
bench | 791,008 | 🔴 +47,952 (6.45%) |
- Upgrade Solana to
1.18.8
(#2867).
Solana version: 1.17.0
Program | Binary Size | +/- |
---|---|---|
bench | 743,056 | 🟢 -417,904 (36.00%) |
Box
theanchor_lang::Result
error variants (#2600).- Change all accounts to have a reference to
AccountInfo
instead of cloning (#2656). - Reduce unnecessary cloning (#2663).
Solana version: 1.16.0
Program | Binary Size | +/- |
---|---|---|
bench | 1,160,960 | 🔴 +23,272 (2.05%) |
- Upgrading Solana to
1.16
. The difference in binary size between0.27.0
and0.28.0
is the direct result of upgrading Solana version(both build tools and crates) (#2512).
Solana version: 1.14.16
Program | Binary Size | +/- |
---|---|---|
bench | 1,137,688 | N/A |