# Binary Size

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](https://github.com/coral-xyz/anchor/tree/master/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.

## [Unreleased]

Solana version: 1.17.0

| Program | Binary Size | -   |
| ------- | ----------- | --- |
| bench   | 735,800     | -   |

### Notable changes

---

## [0.29.0]

Solana version: 1.17.0

| Program | Binary Size | +/-                      |
| ------- | ----------- | ------------------------ |
| bench   | 735,800     | 🟢 **-417,936 (36.22%)** |

### Notable changes

- `Box` the `anchor_lang::Result` error variants ([#2600](https://github.com/coral-xyz/anchor/pull/2600)).
- Change all accounts to have a reference to `AccountInfo` instead of cloning ([#2656](https://github.com/coral-xyz/anchor/pull/2656)).
- Reduce unnecessary cloning ([#2663](https://github.com/coral-xyz/anchor/pull/2663)).

---

## [0.28.0]

Solana version: 1.16.0

| Program | Binary Size | +/-                    |
| ------- | ----------- | ---------------------- |
| bench   | 1,153,736   | 🔴 **+35,000 (3.13%)** |

### Notable changes

- Upgrading Solana to `1.16`. The difference in binary size between `0.27.0` and `0.28.0` is the direct result of upgrading Solana version(both build tools and crates) ([#2512](https://github.com/coral-xyz/anchor/pull/2512)).

---

## [0.27.0]

Solana version: 1.14.16

| Program | Binary Size | +/- |
| ------- | ----------- | --- |
| bench   | 1,118,736   | N/A |

---
