TEMP: preliminary costing attempt for insertCoin
Home /
Input Output /
plutus
Nov 09, 1-2 PM (0)
Nov 09, 2-3 PM (0)
Nov 09, 3-4 PM (0)
Nov 09, 4-5 PM (0)
Nov 09, 5-6 PM (0)
Nov 09, 6-7 PM (0)
Nov 09, 7-8 PM (0)
Nov 09, 8-9 PM (0)
Nov 09, 9-10 PM (0)
Nov 09, 10-11 PM (1)
Nov 09, 11-12 AM (1)
Nov 10, 12-1 AM (0)
Nov 10, 1-2 AM (0)
Nov 10, 2-3 AM (0)
Nov 10, 3-4 AM (0)
Nov 10, 4-5 AM (0)
Nov 10, 5-6 AM (0)
Nov 10, 6-7 AM (0)
Nov 10, 7-8 AM (0)
Nov 10, 8-9 AM (25)
Nov 10, 9-10 AM (0)
Nov 10, 10-11 AM (0)
Nov 10, 11-12 PM (0)
Nov 10, 12-1 PM (0)
Nov 10, 1-2 PM (0)
Nov 10, 2-3 PM (0)
Nov 10, 3-4 PM (0)
Nov 10, 4-5 PM (0)
Nov 10, 5-6 PM (0)
Nov 10, 6-7 PM (0)
Nov 10, 7-8 PM (0)
Nov 10, 8-9 PM (0)
Nov 10, 9-10 PM (0)
Nov 10, 10-11 PM (0)
Nov 10, 11-12 AM (0)
Nov 11, 12-1 AM (0)
Nov 11, 1-2 AM (0)
Nov 11, 2-3 AM (1)
Nov 11, 3-4 AM (0)
Nov 11, 4-5 AM (0)
Nov 11, 5-6 AM (0)
Nov 11, 6-7 AM (0)
Nov 11, 7-8 AM (0)
Nov 11, 8-9 AM (0)
Nov 11, 9-10 AM (0)
Nov 11, 10-11 AM (0)
Nov 11, 11-12 PM (0)
Nov 11, 12-1 PM (0)
Nov 11, 1-2 PM (3)
Nov 11, 2-3 PM (0)
Nov 11, 3-4 PM (4)
Nov 11, 4-5 PM (3)
Nov 11, 5-6 PM (1)
Nov 11, 6-7 PM (0)
Nov 11, 7-8 PM (0)
Nov 11, 8-9 PM (0)
Nov 11, 9-10 PM (0)
Nov 11, 10-11 PM (1)
Nov 11, 11-12 AM (1)
Nov 12, 12-1 AM (0)
Nov 12, 1-2 AM (0)
Nov 12, 2-3 AM (0)
Nov 12, 3-4 AM (0)
Nov 12, 4-5 AM (0)
Nov 12, 5-6 AM (0)
Nov 12, 6-7 AM (0)
Nov 12, 7-8 AM (0)
Nov 12, 8-9 AM (0)
Nov 12, 9-10 AM (2)
Nov 12, 10-11 AM (4)
Nov 12, 11-12 PM (1)
Nov 12, 12-1 PM (1)
Nov 12, 1-2 PM (9)
Nov 12, 2-3 PM (1)
Nov 12, 3-4 PM (0)
Nov 12, 4-5 PM (0)
Nov 12, 5-6 PM (0)
Nov 12, 6-7 PM (0)
Nov 12, 7-8 PM (0)
Nov 12, 8-9 PM (0)
Nov 12, 9-10 PM (0)
Nov 12, 10-11 PM (0)
Nov 12, 11-12 AM (0)
Nov 13, 12-1 AM (0)
Nov 13, 1-2 AM (0)
Nov 13, 2-3 AM (0)
Nov 13, 3-4 AM (0)
Nov 13, 4-5 AM (0)
Nov 13, 5-6 AM (1)
Nov 13, 6-7 AM (1)
Nov 13, 7-8 AM (0)
Nov 13, 8-9 AM (0)
Nov 13, 9-10 AM (3)
Nov 13, 10-11 AM (2)
Nov 13, 11-12 PM (0)
Nov 13, 12-1 PM (1)
Nov 13, 1-2 PM (5)
Nov 13, 2-3 PM (0)
Nov 13, 3-4 PM (2)
Nov 13, 4-5 PM (2)
Nov 13, 5-6 PM (12)
Nov 13, 6-7 PM (1)
Nov 13, 7-8 PM (2)
Nov 13, 8-9 PM (0)
Nov 13, 9-10 PM (1)
Nov 13, 10-11 PM (0)
Nov 13, 11-12 AM (1)
Nov 14, 12-1 AM (1)
Nov 14, 1-2 AM (0)
Nov 14, 2-3 AM (0)
Nov 14, 3-4 AM (0)
Nov 14, 4-5 AM (0)
Nov 14, 5-6 AM (0)
Nov 14, 6-7 AM (0)
Nov 14, 7-8 AM (0)
Nov 14, 8-9 AM (0)
Nov 14, 9-10 AM (0)
Nov 14, 10-11 AM (1)
Nov 14, 11-12 PM (0)
Nov 14, 12-1 PM (0)
Nov 14, 1-2 PM (3)
Nov 14, 2-3 PM (3)
Nov 14, 3-4 PM (0)
Nov 14, 4-5 PM (0)
Nov 14, 5-6 PM (1)
Nov 14, 6-7 PM (0)
Nov 14, 7-8 PM (0)
Nov 14, 8-9 PM (0)
Nov 14, 9-10 PM (0)
Nov 14, 10-11 PM (0)
Nov 14, 11-12 AM (0)
Nov 15, 12-1 AM (0)
Nov 15, 1-2 AM (0)
Nov 15, 2-3 AM (0)
Nov 15, 3-4 AM (0)
Nov 15, 4-5 AM (0)
Nov 15, 5-6 AM (0)
Nov 15, 6-7 AM (3)
Nov 15, 7-8 AM (0)
Nov 15, 8-9 AM (0)
Nov 15, 9-10 AM (0)
Nov 15, 10-11 AM (0)
Nov 15, 11-12 PM (1)
Nov 15, 12-1 PM (0)
Nov 15, 1-2 PM (0)
Nov 15, 2-3 PM (0)
Nov 15, 3-4 PM (0)
Nov 15, 4-5 PM (0)
Nov 15, 5-6 PM (0)
Nov 15, 6-7 PM (0)
Nov 15, 7-8 PM (1)
Nov 15, 8-9 PM (0)
Nov 15, 9-10 PM (0)
Nov 15, 10-11 PM (0)
Nov 15, 11-12 AM (0)
Nov 16, 12-1 AM (0)
Nov 16, 1-2 AM (0)
Nov 16, 2-3 AM (0)
Nov 16, 3-4 AM (0)
Nov 16, 4-5 AM (0)
Nov 16, 5-6 AM (0)
Nov 16, 6-7 AM (0)
Nov 16, 7-8 AM (0)
Nov 16, 8-9 AM (0)
Nov 16, 9-10 AM (0)
Nov 16, 10-11 AM (0)
Nov 16, 11-12 PM (0)
Nov 16, 12-1 PM (0)
Nov 16, 1-2 PM (0)
107 commits this week
Nov 09, 2025
-
Nov 16, 2025
Add insertCoin and unionValue costing skeleton
Use correct "golden.eval" postfix for workflow and script
Add `CaseApply` optimization
feat(cost-model): update valueContains costs after isSubmapOfBy optimization
Update benchmark data and cost model parameters based on optimized valueContains implementation using Map.isSubmapOfBy. Benchmark results show significant performance improvement: - Slope: 6548 → 1470 (4.5x speedup in per-operation cost) - Intercept: 1000 → 1,163,050 (increased fixed overhead) The slope reduction confirms the 3-4x speedup observed in local testing. Higher intercept may reflect actual setup overhead in isSubmapOfBy or statistical fitting on the new benchmark distribution. Benchmark data: 1023 ValueContains measurements from GitHub Actions run 19367901303 testing the optimized implementation.
Reverse order of application frames in CEK return rule of case
Add missing empty list in CEK compute rule of constr
perf(bench): optimize worst-case Value benchmark generation
Optimize generateConstrainedValueWithMaxPolicy to minimize off-path map sizes while maintaining worst-case lookup guarantees: 1. Sort keys explicitly to establish predictable BST structure 2. Select maximum keys (last in sorted order) for worst-case depth 3. Populate only target policy with full token set (tokensPerPolicy) 4. Use minimal maps (1 token) for all other policies Impact: - 99.7% reduction in benchmark value size (524K → 1.5K entries) - ~340× faster map construction during benchmark generation - ~99.7% memory reduction (52 MB → 150 KB per value) - Zero change to cost measurements (worst-case preserved) Affects: LookupCoin, ValueContains benchmarks Formula: totalEntries = tokensPerPolicy + (numPolicies - 1) Example: 1024 policies × 512 tokens = 1,535 entries (was 524,288) Rationale: BST lookups only traverse one path from root to leaf. Off-path policies are never visited, so their inner map sizes don't affect measurement. Reducing off-path maps from tokensPerPolicy to 1 eliminates 99.7% of irrelevant data without changing worst-case cost. Technical details: - ByteString keys already use worst-case comparison (28-byte prefix) - Sorting + last selection guarantees maximum BST depth (rightmost leaf) - Target policy still has full token set for worst-case inner lookup - Validates correct behavior: build succeeds, benchmarks run normally
WIP casing constants docs
perf(valueContains): optimize with isSubmapOfBy for 2-4x speedup
Replace manual iteration + lookupCoin implementation with Data.Map.Strict's isSubmapOfBy, which provides 2-4x performance improvement through: - Parallel tree traversal instead of n₂ independent binary searches - Better cache locality from sequential traversal - Early termination on first mismatch - Reduced function call overhead Implementation change: - Old: foldrWithKey + lookupCoin for each entry (O(n₂ × log(max(m₁, k₁)))) - New: isSubmapOfBy (isSubmapOfBy (<=)) (O(m₂ × k_avg) with better constants) Semantic equivalence verified: - Both check v2 ⊆ v1 using q2 ≤ q1 for all entries - All plutus-core-test property tests pass (99 tests × 3 variants) - Conformance tests show expected budget reduction (~50% CPU cost reduction) Next steps: - Re-benchmark with /costing:remote to measure actual speedup - Re-fit cost model parameters (expect slope reduction from 6548 to ~1637-2183) - Update conformance test budget expectations after cost model update Credit: Based on optimization discovered by Kenneth.
fix(bench): prevent duplicate entries in ValueContains benchmarks
Fix bug where worst-case entry could be duplicated in selectedEntries when it appears at a low position in allEntries (which happens for containers with small tokensPerPolicy values). The issue occurred because the code took the first N-1 entries from allEntries and then appended worstCaseEntry, without checking if worstCaseEntry was already included in those first N-1 entries. For containers like 32768×2, the worst-case entry (policy[0], token[1]) is at position 1, so it was included in both the "others" list and explicitly appended, creating a duplicate. Value.fromList deduplicates entries, resulting in benchmarks with one fewer entry than intended (e.g., 99 instead of 100), producing incorrect worst-case measurements. Solution: Filter out worstCaseEntry from allEntries before taking the first N-1 entries, ensuring it only appears once at the end of the selected entries list.
Add interactive cost model visualizations
Add Plotly-based visualizations for Plutus Core builtin function cost models. Features: - Interactive 2D/3D scatter plots with Plotly.js - Benchmark data vs fitted model predictions overlay - Configurable data sources (branch name or custom URLs) - LocalStorage persistence for user settings - Collapsible configuration panels - Four initial functions: ValueData, UnValueData, ValueContains, LookupCoin Accessible at: https://plutus.cardano.intersectmbo.org/cost-models/
Preliminary ghc-9.14 support
Currently using ghc-9.14.0.20251028 (-rc1).
Deploying to gh-pages from @ IntersectMBO/plutus@2a6be75760bfa0cc1e2a002f0bb1cba7672f6062 🚀
Deploying to gh-pages from @ IntersectMBO/plutus@4f0c0b02e65e829c9ac3f1264e46eb889178e9f9 🚀
add Plutus Benchmarks (customSmallerIsBetter) benchmark result for 4f0c0b02e65e829c9ac3f1264e46eb889178e9f9
Deploying to gh-pages from @ IntersectMBO/plutus@409e79543196a086c04a4ff257f7c8be8c8a71a7 🚀
Delete oldest haddock build 1.46.0.0
Deploying to gh-pages from @ IntersectMBO/plutus@4f0c0b02e65e829c9ac3f1264e46eb889178e9f9 🚀
Add workaround for profiling bug in GHC 9.6/9.8 (#7416)
This bug caused a panic building plutus-metatheory with profiling enabled. We work around it by disabling automatic cost centres. See #7415
docs: add changelog entry for Value builtin cost models
Document the addition of fitted cost model parameters for Value-related builtins based on comprehensive benchmark measurements.
test: update conformance and ledger API tests for Value builtins
Update test expectations across the codebase to reflect refined cost models: conformance test budgets (8 cases), ParamName additions for V1/V2/V3 ledger APIs (11 new params per version), param count tests, cost model registrations, and generator support. All updates reflect the transition from placeholder costs to fitted models.
feat(cost-model): apply fitted parameters from Value builtin benchmarks
Update all three cost model variants (A, B, C) with parameters fitted from comprehensive benchmark runs. Includes extensive timing data covering full parameter ranges for all four Value builtins. Models derived from remote benchmark runs on dedicated hardware with systematic worst-case test coverage ensuring conservative on-chain cost estimates.