@@ -19,28 +19,37 @@ Entrypoint implementation currently included in the benchmark:
1919- [ ` pinocchio ` ] ( https://github.com/anza-xyz/pinocchio )
2020- [ ` solana-nostd-entrypoint ` ] ( https://github.com/cavemanloverboy/solana-nostd-entrypoint )
2121- [ ` solana-program ` ] ( https://github.com/anza-xyz/agave/tree/master/sdk/program )
22+ - [ ` jiminy ` ] ( https://github.com/igneous-labs/jiminy )
2223
23- | Benchmark | ` pinocchio ` | ` solana-nostd-entrypoint ` | ` solana-program ` |
24- | ------------- | ------------ | ------------------------- | ----------------- |
24+ | Benchmark | ` pinocchio ` | ` solana-nostd-entrypoint ` | ` solana-program ` | ` jiminy ` |
25+ | ------------- | --------------- | ------------------------- | ----------------- | ------------ |
2526| _ Entrypoint_ |
26- | Ping | 🟩 ** 14** | 🟩 ** 14** | 🟧 41 (+27) |
27- | Log | 🟩 ** 119** | 🟩 ** 119** | 🟧 146 (+27) |
28- | Account (1) | 🟩 ** 38 ** | 🟩 39 (+1 ) | 🟥 235 (+196) |
29- | Account (3) | 🟩 ** 66** | 🟩 69 (+3) | 🟥 541 (+475) |
30- | Account (5) | 🟩 ** 94** | 🟩 99 (+5) | 🟥 847 (+753 ) |
31- | Account (10) | 🟩 ** 164** | 🟩 174 (+10) | 🟥 1,612 (+1,448) |
32- | Account (20) | 🟩 ** 304** | 🟨 324 (+20) | 🟥 3,142 (+2,838 ) |
33- | Account (32) | 🟩 ** 472** | 🟨 504 (+32) | 🟥 4,978 (+4,506 ) |
34- | Account (64) | 🟩 ** 920** | 🟨 985 (+65) | 🟥 9,874 (+8,954 ) |
27+ | Ping | 🟩 ** 14** | 🟩 ** 14** | 🟧 41 (+27) | 🟩 ** 14 ** |
28+ | Log | 🟩 ** 119** | 🟩 ** 119** | 🟧 146 (+27) | 🟩 ** 119 ** |
29+ | Account (1) | 🟩 38 (+2) | 🟩 39 (+3 ) | 🟥 235 (+199) | 🟩 ** 36 ** |
30+ | Account (3) | 🟩 ** 66** | 🟩 69 (+3) | 🟥 541 (+475) | 🟩 ** 66 ** |
31+ | Account (5) | 🟩 ** 94** | 🟩 99 (+5) | 🟥 847 (+751 ) | 🟩 96 (+2) |
32+ | Account (10) | 🟩 ** 164** | 🟩 174 (+10) | 🟥 1,612 (+1,441) | 🟩 171 (+7) |
33+ | Account (20) | 🟩 ** 304** | 🟨 324 (+20) | 🟥 3,142 (+2,821) | 🟨 321 (+17 ) |
34+ | Account (32) | 🟩 ** 472** | 🟨 504 (+32) | 🟥 4,978 (+4,477) | 🟨 501 (+29 ) |
35+ | Account (64) | 🟩 ** 920** | 🟨 985 (+65) | 🟥 9,874 (+8,893) | 🟨 981 (+61 ) |
3536| _ CPI_ |
36- | CreateAccount | 🟩 ** 1,449** | 🟨 1,494 (+45 ) | 🟥 2,786 (+1,337) |
37- | Transfer | 🟩 ** 1,439** | 🟨 1,487 (+48 ) | 🟥 2,379 (+940) |
37+ | CreateAccount | 🟨 1,449 (+142) | 🟨 1,494 (+187 ) | 🟥 2,786 (+1,479) | 🟩 ** 1,307 ** |
38+ | Transfer | 🟨 1,439 (+140) | 🟨 1,487 (+180 ) | 🟥 2,379 (+1,080) | 🟩 ** 1,299 ** |
3839
3940> [ !IMPORTANT]
4041> Values correspond to compute units (CUs) consumed by the entrypoint. The delta in relation to the lowest consumption is shown in brackets.
4142>
4243> Solana CLI ` v2.2.6 ` was used in the bench tests.
4344
45+ ## Binary Sizes
46+
47+ The size of the compiled benchmark program for each entrypoint is shown below. The delta in relation to the smallest binary size is shown in brackets.
48+
49+ | Binary size (bytes) | ` pinocchio ` | ` solana-nostd-entrypoint ` | ` solana-program ` | ` jiminy ` |
50+ | ------------------- | ------------------ | ------------------------- | ------------------- | -------- |
51+ | | 🟥 10,736 (+7,240) | 🟥 17,720 (+14,224) | 🟥 64,688 (+61,192) | 🟩 3,496 |
52+
4453## Benchmark
4554
4655The benchmark uses a simple program with multiple instructions to measure the compute units (CUs) consumed by the entrypoint. Note that the intention is not to write the most efficient program, instead to reflect an "average" program implementation. The aim is to use the exactly same program implementation, replacing the entrypoint to determine the impact on the CUs consumed.
0 commit comments