Benchmark P-Token (SIMD-0266) compute units live on Solana
╭───────────────────────┬──────────────────┬────────────────┬─────────────╮
│ Operation │ SPL Token (live) │ P-Token (live) │ Improvement │
╞═══════════════════════╪══════════════════╪════════════════╪═════════════╡
│ Mint creation │ 3,219 CU │ 386 CU │ 88.0% less │
│ Mint tokens │ 4,641 CU │ 270 CU │ 94.2% less │
│ Transfer (avg n=20) │ 6,323 CU │ 255 CU │ 96.0% less │
│ Transfer (min / max) │ 6,323 / 6,323 │ 255 / 255 CU │ │
╰───────────────────────┴──────────────────┴────────────────┴─────────────╯
Both columns are real on-chain measurements. Nothing hardcoded. Every TX signature is verifiable on Solana Explorer.
P-Token (SIMD-0266) is a drop-in replacement for the SPL Token program, rebuilt from scratch using Pinocchio.
- ✅ Same program address —
TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA - ✅ Same instruction and account layout — byte for byte compatible
- ✅ Zero client-side changes required
- ✅ 96% fewer compute units per transfer
- ✅ Live on mainnet
cargo install p-speedPrerequisites:
- Rust stable — rustup.rs
- Solana CLI — docs.solana.com
Connects to devnet or mainnet and measures real P-Token compute units.
# devnet (free)
p-speed run --rpc devnet --transfers 20
# mainnet (costs ~$0.02)
p-speed run --rpc mainnet --transfers 20
# custom RPC
p-speed run --rpc https://your-rpc.com --transfers 20
# save results to JSON
p-speed run --rpc devnet --transfers 20 --output results.jsonRuns the benchmark on two sides simultaneously:
- Local validator with P-Token feature gate OFF → old SPL Token bytecode
- Devnet or mainnet with feature gate ON → P-Token bytecode
Both columns are real on-chain measurements.
Step 1 — open a new terminal and start local validator:
solana-test-validator \
--deactivate-feature ptokFjwyJtrwCa9Kgo9xoDS59V4QccBGEaRFnRPnSdPWait until you see JSON RPC URL: http://127.0.0.1:8899. Keep this terminal open.
Step 2 — fund local wallet and run:
solana airdrop 5 --url http://127.0.0.1:8899
p-speed compare --transfers 20Compare against mainnet instead of devnet:
p-speed compare --ptoken-rpc mainnet --transfers 20If you forget to start the validator, P-Speed tells you exactly what to do:
✗ Local validator is not running.
Start it in a new terminal:
solana-test-validator \
--deactivate-feature ptokFjwyJtrwCa9Kgo9xoDS59V4QccBGEaRFnRPnSdP
Then run p-speed compare again.
P-Token lives at the same address as old SPL Token. The Solana runtime swaps the bytecode when the feature gate (ptokFjwyJtrwCa9Kgo9xoDS59V4QccBGEaRFnRPnSdP) is active.
On mainnet and devnet the gate is already ON — you can only get P-Token numbers there. The only way to get real old SPL numbers is a local validator with the gate explicitly disabled. --deactivate-feature tells the validator to run as if P-Token was never shipped.
solana-test-validator (no flags)
→ copies mainnet → feature gate ON → P-Token bytecode → 255 CU
solana-test-validator --deactivate-feature ptok...
→ feature gate OFF → old SPL bytecode → 6,323 CU ← what we want
P-Speed reads transaction.meta.compute_units_consumed from every confirmed transaction — the actual compute units used by the validator, not the budget limit.
Every signature printed by P-Speed can be verified on Solana Explorer.
| Flag | Default | Description |
|---|---|---|
--rpc |
devnet |
RPC: devnet | mainnet | local | full URL |
--transfers / -n |
20 |
Number of transfers to benchmark |
--keypair |
~/.config/solana/id.json |
Path to payer keypair |
--output |
— | Save results to JSON |
--spl-rpc |
local |
(compare only) SPL Token RPC |
--ptoken-rpc |
devnet |
(compare only) P-Token RPC |
cargo testAll tests run offline — no RPC, no SOL required.
MIT — see LICENSE
Built by @anmol0b · Pure Rust · No Anchor · P-Token live on mainnet