Skip to content

Conversation

@LucasSte
Copy link
Collaborator

@LucasSte LucasSte commented Nov 20, 2025

Problem

When I was working on the PR for eBPF upstream, I noticed the shouldReduceLoadWidth function that is there to appease the kernel verifier. If we remove it, we have some gains.

Benchmarks

Programs/sbf

  SBF program                          expected actual  diff
  solana_sbf_rust_128bit                    630   630    +0 ( +0%)
  solana_sbf_rust_alloc                    4767  4767    +0 ( +0%)
  solana_sbf_rust_custom_heap               324   324    +0 ( +0%)
  solana_sbf_rust_dep_crate                  20    20    +0 ( +0%)
  solana_sbf_rust_iter                     1513  1513    +0 ( +0%)
  solana_sbf_rust_many_args                1281  1281    +0 ( +0%)
  solana_sbf_rust_mem                      1195  1194    -1 ( -0%)
  solana_sbf_rust_membuiltins                69    68    -1 ( -1%)
  solana_sbf_rust_noop                      342   342    +0 ( +0%)
  solana_sbf_rust_param_passing             108   108    +0 ( +0%)
  solana_sbf_rust_rand                      301   301    +0 ( +0%)
  solana_sbf_rust_sanity                  13576 13576    +0 ( +0%)
  solana_sbf_rust_secp256k1_recover       88376 88376    +0 ( +0%)
  solana_sbf_rust_sha                     21984 21984    +0 ( +0%)

No changes to Solana program or Pinocchio entrypoint.

p-token instructions:

Instruction Master This PR Diff
initialize_mint 108 108 0
initialize_account 157 157 0
initialize_multisig 221 220 -1
transfer 76 76 0
approve 136 135 -1
revoke 102 101 -1
set_authority 130 129 -1
mint_to 122 122 0
burn 129 129 0
close_account 120 120 0
freeze_account 150 149 -1
thaw_account 146 145 -1
transfer_checked 105 105 0
approve_checked 183 182 -1
mint_to_checked 176 175 -1
burn_checked 147 147 0
initialize_account2 179 178 -1
initialize_account3 247 247 0
initialize_multisig2 342 341 -1
initialize_mint2 229 229 0
amount_to_ui_amount 424 423 -1
ui_amount_to_amount 697 696 -1
initialize_immutable_owner 38 38 0
sync_native 62 62 0
batch 1493 1493 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant