Skip to content

Commit 7eebe28

Browse files
committed
refactor: simplify Value benchmarks with Cardano-compliant constraints
Refactor the Value benchmarking suite to use Cardano-compliant key sizes (32-byte max) and leverage the new Logarithmic wrapper for accurate modeling of logarithmic operations. Key changes: - Apply Logarithmic wrapper to lookupCoin and valueContains benchmarks for proper O(log n) cost modeling - Consolidate key generators from 4 functions to 2, eliminating duplication - Remove obsolete key size parameters throughout (keys always maxKeyLen) - Extract withSearchKeys pattern to eliminate repetitive code - Simplify test generation by removing arbitrary key size variations - Clean up lookupCoinArgs structure for better readability The refactoring reduces the module from 359 to 298 lines while improving clarity and ensuring all generated Values comply with Cardano's 32-byte key length limit.
1 parent c5fc0ae commit 7eebe28

File tree

1 file changed

+83
-185
lines changed
  • plutus-core/cost-model/budgeting-bench/Benchmarks

1 file changed

+83
-185
lines changed

0 commit comments

Comments
 (0)