# Benchmarking Bitcoin Script Evaluation for the Varops Budget (Great Script Restoration)

**URL:** <https://delvingbitcoin.org/t/benchmarking-bitcoin-script-evaluation-for-the-varops-budget-great-script-restoration/2094>\
**Category:** Protocol Design\
**Tags:** softfork\
**Created:** [November 7, 2025, 3:14pm UTC](https://delvingbitcoin.org/t/benchmarking-bitcoin-script-evaluation-for-the-varops-budget-great-script-restoration/2094 "2025-11-07T15:14:37Z")\
**Posts on this page:** 1\
**Showing post:** 17

<div class="post-metadata">

**Author:** ![Julian](https://delvingbitcoin.org/letter_avatar_proxy/v4/letter/j/74df32/32.png) [@Julian](https://delvingbitcoin.org/u/Julian)\
**Post date:** [February 8, 2026, 3:07pm UTC](https://delvingbitcoin.org/t/benchmarking-bitcoin-script-evaluation-for-the-varops-budget-great-script-restoration/2094/17 "2026-02-08T15:07:23Z")

</div>

> [@ajtowns](#):
>
> Doing benchmarks on the more powerful logic new opcodes enable might be more interesting; eg the [OP\_CAT based zkp verifier](https://bitcoinmagazine.com/technical/a-zero-knowledge-proof-is-verified-on-bitcoin-for-the-first-time-in-history)? How many zkps (implemented that way) could we verify in a block, if 100ms (or whatever) of cpu time were the only constraint? Seems to have some 223k operations per script, 30k ADD/DUP, 20k IF/ENDIF/SUB, 10k SWAP/LESSTHAN/TOALT/FROMALT, 400 CAT/1SUB/DEPTH/SHA256, 1 CHECKSIG, etc.

Coming back to this: The OP\_CAT based zkp verifier implemented here is extremely lightweight, it has around 3m ops in total but it mostly uses cheap instructions like OP\_ADD, OP\_DUP, OP\_PICK, OP\_SWAP, it seems that the only expensive op OP\_SHA256 accounts for only 0.4% of all operations. Furthermore, the QM31 elements (and their hashes) are at most 36 bytes so hashing them is also very fast.

All 72 transactions together use about 88% of block space while using only 6.6 million varops (0.03% of the block limit) and all scripts are evaluated in only ~10ms on my machine.

So while this is a super interesting application of OP\_CAT, it does not really matter in terms of compute, it seems that Starknet is focusing on OP\_CAT only, but we could have much more efficient and potentially compute heavy implementations using OP\_MUL and larger stack element limits. I would be happy to benchmark these too but they don’t seem to be available.

---

_[View the full topic](https://delvingbitcoin.org/t/benchmarking-bitcoin-script-evaluation-for-the-varops-budget-great-script-restoration/2094)._
