From 995c2fb6958989efb2d1b2495fee006d6cbf07e0 Mon Sep 17 00:00:00 2001 From: Yuriy Lazaryev Date: Tue, 25 Aug 2026 16:04:34 +0200 Subject: [PATCH 1/2] Cost model for `policies` (CIP-0168) Benchmarks the builtin over 111 values and adds the four resulting parameters to the cost model record, the five JSON variants and the ledger API parameter lists. The work is linear in the number of policies alone, so a new `ValueOuterSize` wrapper threads the outer map size through the denotation, the way `lookupCoin` uses `ValueMaxDepth`. `Map.size` reads a field of the root node, so the measure stays O(1) and does not force the inner maps. Values with a fixed policy count (1000 and 5000) and token counts from 1 to 40 differ by under 5%, with no correlation with the token count, which is what a measure keyed on the outer map predicts. The number of policies is sampled log-uniformly up to 40000, so every decade gets similar coverage, and the cap sits above the largest value a script can build within the CPU budget (roughly 14000 `insertCoin` applications). Memory is charged at three words per cons cell, because the result shares its bytestrings with the `Value` and only the list spine is new. Closes IntersectMBO/plutus-private#2309. --- doc/cost-models/policies/index.html | 118 +++++++ doc/cost-models/policies/plot.js | 171 ++++++++++ doc/cost-models/shared/utils.js | 3 + ..._154936_yuriy.lazaryev_policies_costing.md | 3 + .../budgeting-bench/Benchmarks/Values.hs | 44 +++ .../create-cost-model/BuiltinMemoryModels.hs | 4 + .../CreateBuiltinCostModel.hs | 2 + .../cost-model/data/benching-conway.csv | 321 ++++++++++++------ .../cost-model/data/builtinCostModelA.json | 16 + .../cost-model/data/builtinCostModelB.json | 16 + .../cost-model/data/builtinCostModelC.json | 16 + .../cost-model/data/builtinCostModelD.json | 16 + .../cost-model/data/builtinCostModelE.json | 16 + plutus-core/cost-model/data/models.R | 6 +- plutus-core/cost-model/test/TestCostModels.hs | 1 + .../src/PlutusCore/Default/Builtins.hs | 7 +- .../src/PlutusCore/Default/Universe.hs | 16 + .../Evaluation/Machine/BuiltinCostModel.hs | 1 + .../Evaluation/Machine/ExBudgetingDefaults.hs | 1 + .../Evaluation/Machine/ExMemoryUsage.hs | 8 + .../Signatures/DefaultFun/Policies.golden.sig | 2 +- .../src/PlutusLedgerApi/V1/ParamName.hs | 4 + .../src/PlutusLedgerApi/V2/ParamName.hs | 4 + .../src/PlutusLedgerApi/V3/ParamName.hs | 4 + .../src/PlutusLedgerApi/V4/ParamName.hs | 4 + .../test/Spec/CostModelParams.hs | 8 +- .../test/Spec/Data/CostModelParams.hs | 8 +- 27 files changed, 702 insertions(+), 118 deletions(-) create mode 100644 doc/cost-models/policies/index.html create mode 100644 doc/cost-models/policies/plot.js create mode 100644 plutus-core/changelog.d/20260819_154936_yuriy.lazaryev_policies_costing.md diff --git a/doc/cost-models/policies/index.html b/doc/cost-models/policies/index.html new file mode 100644 index 00000000000..b0824f6d133 --- /dev/null +++ b/doc/cost-models/policies/index.html @@ -0,0 +1,118 @@ + + + + + + Policies - Plutus Cost Model Visualization + + + + + + +
+

Policies Cost Model Visualization

+

+ Interactive visualization of benchmark data and fitted cost model for the Policies builtin function. + This function returns the currency symbols of a Value in ascending order. +

+ +
+

Data Source Configuration

+
+
+ +
+ + +
+
+
+ + +
+
+ + +
+
+ +
+
+
+ +
+

Plot Controls

+
+
+ + +
+
+ + +
+
+
+ +
+
+
Loading data and generating plot...
+
+ +
+

Plot Information

+ +
+
+
X-axis:
+
Value Size
+ +
Y-axis:
+
Time (nanoseconds)
+ +
Description:
+
Each point represents one benchmark run
+
+
+ +
+
Cost Model Type:
+
Loading...
+ +
Model Formula (net):
+
Loading...
+ +
Overhead:
+
Loading...
+
+ +
+
+
Data points:
+
-
+ +
Value Size range:
+
-
+ +
Time range:
+
-
+
+
+ +
+
+
+
+
+
+ + + + + + + diff --git a/doc/cost-models/policies/plot.js b/doc/cost-models/policies/plot.js new file mode 100644 index 00000000000..6419da09279 --- /dev/null +++ b/doc/cost-models/policies/plot.js @@ -0,0 +1,171 @@ +// Policies plot configuration and rendering + +// Configuration +const FUNCTION_NAME = 'Policies'; // CSV uses PascalCase +const COST_MODEL_NAME = 'policies'; // JSON uses camelCase +const ARITY = 1; + +// Global state +let benchmarkData = []; +let modelPredictions = []; +let costModel = null; +let overhead = 0; +let showModel = true; +let yAxisMode = 'zero'; + +setupCostModelPage({ + slug: 'policies', + functionName: FUNCTION_NAME, + costModelName: COST_MODEL_NAME, + arity: ARITY, + render(data) { + ({ benchmarkData, costModel, overhead, modelPredictions } = data); + updateInfoPanel(); + renderPlot(); + }, + setupControls +}); + +function updateInfoPanel() { + // Calculate stats + const stats = calculateStats(benchmarkData, 0); + + // Update data points + document.getElementById('info-data-points').textContent = stats.dataPoints; + + // Update ranges + if (stats.minArg !== undefined) { + document.getElementById('info-x-range').textContent = `${stats.minArg} - ${stats.maxArg}`; + } + + document.getElementById('info-time-range').textContent = stats.timeRange; + + // Update model info + if (costModel) { + document.getElementById('info-model-type').textContent = costModel.modelType; + document.getElementById('info-model-formula').textContent = formatModelFormula( + costModel.modelType, + costModel.coefficients + ); + } else { + document.getElementById('info-model-type').textContent = 'Not available'; + document.getElementById('info-model-formula').textContent = 'Cost model not found'; + } + + // Update overhead + if (overhead > 0) { + document.getElementById('info-overhead').textContent = + `${overhead.toFixed(2)} ns (arity ${ARITY}) added to predictions`; + } else { + document.getElementById('info-overhead').textContent = 'Not calculated'; + } +} + +function renderPlot() { + // Prepare benchmark trace + const benchmarkX = benchmarkData.map(d => d.args[0]); + const benchmarkY = benchmarkData.map(d => d.time); + + const benchmarkTrace = { + x: benchmarkX, + y: benchmarkY, + mode: 'markers', + type: 'scatter', + name: 'Benchmark Data', + marker: { + size: 6, + color: '#0033AD', + opacity: 0.7 + } + }; + + const traces = [benchmarkTrace]; + + // Prepare model trace if available + if (showModel && modelPredictions.length > 0) { + const modelX = modelPredictions.map(d => d.args[0]); + const modelY = modelPredictions.map(d => d.predictedTime); + + const modelTrace = { + x: modelX, + y: modelY, + mode: 'markers', + type: 'scatter', + name: 'Model Predictions', + marker: { + size: 6, + color: '#E53E3E', + opacity: 0.4, + symbol: 'x' + } + }; + + traces.push(modelTrace); + } + + // Layout configuration + const layout = { + title: { + text: `${FUNCTION_NAME} - Benchmark vs Model`, + font: { size: 20 } + }, + xaxis: { + title: 'Value Size', + gridcolor: '#E0E0E0' + }, + yaxis: { + title: 'Time (nanoseconds)', + gridcolor: '#E0E0E0' + }, + hovermode: 'closest', + showlegend: true, + legend: { + x: 0.02, + y: 0.98, + bgcolor: 'rgba(255, 255, 255, 0.8)', + bordercolor: '#BDC3C7', + borderwidth: 1 + }, + plot_bgcolor: '#FAFAFA', + paper_bgcolor: 'rgba(0,0,0,0)' + }; + + // Set Y-axis range based on mode + if (yAxisMode === 'zero') { + layout.yaxis.range = [0, Math.max(...benchmarkY) * 1.1]; + } else { + const minY = Math.min(...benchmarkY); + const maxY = Math.max(...benchmarkY); + const padding = (maxY - minY) * 0.1; + layout.yaxis.range = [minY - padding, maxY + padding]; + } + + // Config + const config = { + responsive: true, + displayModeBar: true, + displaylogo: false + }; + + // Render + // Clear loading message + const container = document.getElementById('plot-container'); + container.innerHTML = ''; + Plotly.newPlot('plot-container', traces, layout, config); +} + +function setupControls() { + // Show/hide model checkbox + const showModelCheckbox = document.getElementById('show-model'); + showModelCheckbox.addEventListener('change', (e) => { + showModel = e.target.checked; + renderPlot(); + }); + + // Y-axis mode selector + const yAxisModeSelect = document.getElementById('y-axis-mode'); + yAxisModeSelect.addEventListener('change', (e) => { + yAxisMode = e.target.value; + renderPlot(); + }); +} diff --git a/doc/cost-models/shared/utils.js b/doc/cost-models/shared/utils.js index f8feba459b9..c22a07bbedf 100644 --- a/doc/cost-models/shared/utils.js +++ b/doc/cost-models/shared/utils.js @@ -525,6 +525,9 @@ const PAGES = [ 'Returns the number of (currency symbol, token name) pairs in a Plutus ' + 'Value in O(1) time. ' + '(2D visualization: Value Size vs Time - constant cost)'], + ['policies', 'Policies', + 'Returns the currency symbols of a Plutus Value; linear in the number ' + + 'of policies. (2D visualization: Policy Count vs Time)'], ['listtoarray', 'ListToArray', 'Converts a Plutus list to an array representation. ' + '(2D visualization: List Size vs Time)'], diff --git a/plutus-core/changelog.d/20260819_154936_yuriy.lazaryev_policies_costing.md b/plutus-core/changelog.d/20260819_154936_yuriy.lazaryev_policies_costing.md new file mode 100644 index 00000000000..7504cbaa177 --- /dev/null +++ b/plutus-core/changelog.d/20260819_154936_yuriy.lazaryev_policies_costing.md @@ -0,0 +1,3 @@ +### Added + +- Cost model for the `policies` builtin ([CIP-0168](https://cips.cardano.org/cip/CIP-0168)), with four new cost model parameters. Linear in the number of policies in the `Value`. diff --git a/plutus-core/cost-model/budgeting-bench/Benchmarks/Values.hs b/plutus-core/cost-model/budgeting-bench/Benchmarks/Values.hs index 03825e1f171..78c788986b4 100644 --- a/plutus-core/cost-model/budgeting-bench/Benchmarks/Values.hs +++ b/plutus-core/cost-model/budgeting-bench/Benchmarks/Values.hs @@ -25,6 +25,7 @@ import PlutusCore ( AssetCount , InsertCoin , LookupCoin + , Policies , ScaleValue , UnValueData , UnionValue @@ -37,6 +38,7 @@ import PlutusCore.Builtin (BuiltinResult (BuiltinFailure, BuiltinSuccess, Builti import PlutusCore.Evaluation.Machine.ExMemoryUsage ( DataNodeCount (..) , ValueMaxDepth (..) + , ValueOuterSize (..) , ValueTotalSize (..) ) import PlutusCore.Value @@ -67,6 +69,7 @@ makeBenchmarks gen = , unionValueBenchmark gen , scaleValueBenchmark gen , assetCountBenchmark gen + , policiesBenchmark gen ] ---------------------------------------------------------------------------------------------------- @@ -390,6 +393,47 @@ assetCountBenchmark gen = [] (generateTestValues gen) +-- Policies ---------------------------------------------------------------------------------------- + +{- Note [Benchmarking policies] +`policies` is \(O(m)\) in the size of the outer map, which is exactly what +`ValueOuterSize` (the measure the denotation uses) reports, so the fit applies to any +shape of `Value`. The number of policies is log-uniform so every decade gets similar +coverage. The token count per policy is random under a total-size cap: the inner maps +are never traversed, so it must not show in the measurements, and the fixed-size +stacks (1000 and 5000 policies at several token counts) would make a violation +visible as vertical spread at a single x. +-} +policiesBenchmark :: StdGen -> Benchmark +policiesBenchmark gen = + createOneTermBuiltinBenchWithWrapper_NF ValueOuterSize Policies [] (runBenchGen gen policiesArgs) + where + -- 40k pairs: safely above the largest `Value` a script can build within the + -- CPU budget (roughly 14k `insertCoin` applications). + maxTotalSize :: Int + maxTotalSize = Value.valueDataMaxSize + + policiesArgs :: StatefulGen g m => g -> m [Value] + policiesArgs g = do + randoms <- replicateM 100 do + u <- uniformRM (0 :: Double, log (fromIntegral maxTotalSize)) g + let numPolicies = min maxTotalSize (max 1 (round (exp u))) + numTokens <- uniformRM (1, maxTotalSize `div` numPolicies) g + generate g numPolicies numTokens + stacks <- + sequence + [ generate g m k + | (m, ks) <- [(1000, [1, 2, 5, 10, 20, 40]), (5000, [1, 2, 4, 8])] + , k <- ks + ] + pure $ Value.empty : randoms <> stacks + + generate :: StatefulGen g m => g -> Int -> Int -> m Value + generate g numPolicies numTokens = do + policyIds <- replicateM numPolicies (generateKey g) + tokenNames <- replicateM numTokens (generateKey g) + pure $ buildValue policyIds tokenNames (mkQuantity 1) + ---------------------------------------------------------------------------------------------------- -- Value Generators -------------------------------------------------------------------------------- diff --git a/plutus-core/cost-model/create-cost-model/BuiltinMemoryModels.hs b/plutus-core/cost-model/create-cost-model/BuiltinMemoryModels.hs index 53c0dc44fdf..eac826dd397 100644 --- a/plutus-core/cost-model/create-cost-model/BuiltinMemoryModels.hs +++ b/plutus-core/cost-model/create-cost-model/BuiltinMemoryModels.hs @@ -383,6 +383,10 @@ builtinMemoryModels = -- intercept keeps the cost nonzero for the empty index list. paramMultiIndexArray = Id $ ModelTwoArgumentsLinearInY $ OneVariableLinearFunction 4 3 , paramAssetCount = Id $ ModelOneArgumentConstantCost 10 + , -- `policies` returns the outer map's keys. The bytestrings are shared with the + -- `Value`, so only the list spine is new, at three words per cons cell (as for + -- `multiIndexArray`). The size measure is the number of policies (`ValueOuterSize`). + paramPolicies = Id $ ModelOneArgumentLinearInX $ OneVariableLinearFunction 4 3 } where identityFunction = OneVariableLinearFunction 0 1 diff --git a/plutus-core/cost-model/create-cost-model/CreateBuiltinCostModel.hs b/plutus-core/cost-model/create-cost-model/CreateBuiltinCostModel.hs index 416ea67a4c5..fe1a5ef834f 100644 --- a/plutus-core/cost-model/create-cost-model/CreateBuiltinCostModel.hs +++ b/plutus-core/cost-model/create-cost-model/CreateBuiltinCostModel.hs @@ -155,6 +155,7 @@ builtinCostModelNames = , paramScaleValue = "scaleValueModel" , paramMultiIndexArray = "multiIndexArrayModel" , paramAssetCount = "assetCountModel" + , paramPolicies = "policiesModel" } {-| Loads the models from R. @@ -312,6 +313,7 @@ createBuiltinCostModel bmfile rfile = do paramScaleValue <- getParams readCF2 paramScaleValue paramMultiIndexArray <- getParams readCF2 paramMultiIndexArray paramAssetCount <- getParams readCF1 paramAssetCount + paramPolicies <- getParams readCF1 paramPolicies pure $ BuiltinCostModelBase {..} diff --git a/plutus-core/cost-model/data/benching-conway.csv b/plutus-core/cost-model/data/benching-conway.csv index 8d2331274e2..1a614e5ffbe 100644 --- a/plutus-core/cost-model/data/benching-conway.csv +++ b/plutus-core/cost-model/data/benching-conway.csv @@ -14676,111 +14676,111 @@ EqualsString/12000/6000,1.0854947926449163e-6,1.0847524383708952e-6,1.0862802773 EqualsString/12000/18000,1.0854947926449163e-6,1.0847524383708952e-6,1.08628027730674e-6,2.7731650898131905e-9,2.3129304952288706e-9,3.2981569078113957e-9 EqualsString/18000/6000,1.0854947926449163e-6,1.0847524383708952e-6,1.08628027730674e-6,2.7731650898131905e-9,2.3129304952288706e-9,3.2981569078113957e-9 EqualsString/18000/12000,1.0854947926449163e-6,1.0847524383708952e-6,1.08628027730674e-6,2.7731650898131905e-9,2.3129304952288706e-9,3.2981569078113957e-9 -MultiIndexArray/1/1,1.156430143781973e-6,1.1554242125407608e-6,1.1576048857562016e-6,3.6715593464992983e-9,3.0666155646291575e-9,4.650942969459808e-9 -MultiIndexArray/1/10,1.2553944661796063e-6,1.2540890100100102e-6,1.2586028198471012e-6,6.52468606378491e-9,3.508024465897203e-9,1.2296390844996928e-8 -MultiIndexArray/1/25,1.4528979146564945e-6,1.450854612295361e-6,1.4548086481436988e-6,6.694845699662592e-9,5.922711853444038e-9,7.781447437593305e-9 -MultiIndexArray/1/50,1.7949405547174779e-6,1.7932284409833384e-6,1.797389454081368e-6,6.7426314440037044e-9,5.133266179059529e-9,9.261768979077419e-9 -MultiIndexArray/1/100,2.335382784866838e-6,2.3339823091205926e-6,2.338966695092019e-6,6.985870774711276e-9,3.3756295285080243e-9,1.4731216237721948e-8 -MultiIndexArray/1/250,4.376586417510226e-6,4.373858682775094e-6,4.389037408986428e-6,1.6147107036773836e-8,3.3108501134513076e-9,3.6424667943555515e-8 -MultiIndexArray/1/500,7.529346420677418e-6,7.528196718661825e-6,7.530908827837125e-6,4.720590443797592e-9,3.514223756190818e-9,6.892750346987006e-9 -MultiIndexArray/1/750,1.1009190839349332e-5,1.100447972104189e-5,1.1019060895859785e-5,2.3215495344605778e-8,1.4189047687549464e-8,3.821035635665834e-8 -MultiIndexArray/1/1024,1.4772151402554726e-5,1.4765981540866543e-5,1.47826661329378e-5,2.6997193786795927e-8,1.6275981887173326e-8,4.314445821696222e-8 -MultiIndexArray/8/1,1.154429834379474e-6,1.1535638143662093e-6,1.1552144206470173e-6,2.7940566316976028e-9,2.3608072430144144e-9,3.556885194599204e-9 -MultiIndexArray/8/10,1.2681123397849882e-6,1.2672398144238425e-6,1.2689740433679784e-6,2.997162635218807e-9,2.5585856217946513e-9,3.5484369043064897e-9 -MultiIndexArray/8/25,1.447594714042571e-6,1.4452396550114581e-6,1.4503937175416122e-6,8.330209849763002e-9,7.556637396879305e-9,9.11484235334071e-9 -MultiIndexArray/8/50,1.783881181793763e-6,1.783182890860542e-6,1.7850395715103563e-6,2.8760448497392878e-9,2.2300061601385706e-9,4.343738626243217e-9 -MultiIndexArray/8/100,2.3530737901147577e-6,2.3512553228625093e-6,2.3550161318844e-6,6.215120756527708e-9,4.8022138908084105e-9,9.300506753648837e-9 -MultiIndexArray/8/250,4.385567049451296e-6,4.378640261634477e-6,4.411980611849529e-6,3.680889226790899e-8,6.510277914976513e-9,7.984717385673577e-8 -MultiIndexArray/8/500,7.594031462566146e-6,7.58855650282319e-6,7.622001469221313e-6,3.111275435572256e-8,5.764541357475308e-9,7.430320679452689e-8 -MultiIndexArray/8/750,1.1007325955430895e-5,1.0985633356991794e-5,1.1058413840756636e-5,9.85444115541363e-8,3.860237931953995e-8,1.6833217534956573e-7 -MultiIndexArray/8/1024,1.5007676569837957e-5,1.4994506269073943e-5,1.5026164720376812e-5,5.2871593061357907e-8,4.3390323910853545e-8,6.692611220554551e-8 -MultiIndexArray/64/1,1.159114284620975e-6,1.1581282544381744e-6,1.1601405988731175e-6,3.152152345061858e-9,2.480780727803682e-9,4.054487437081387e-9 -MultiIndexArray/64/10,1.2403077310719796e-6,1.2385817161614763e-6,1.2421738961032788e-6,6.0036829395468816e-9,5.2849611905711335e-9,6.9781798921450465e-9 -MultiIndexArray/64/25,1.4506134420369243e-6,1.449024435284276e-6,1.4517318818521657e-6,4.4319962962801846e-9,3.112553700714273e-9,6.190009294397226e-9 -MultiIndexArray/64/50,1.77948469077602e-6,1.7789515010014516e-6,1.780088067474157e-6,1.935775115941161e-9,1.4163231991436661e-9,2.9848090268929233e-9 -MultiIndexArray/64/100,2.3466317492465594e-6,2.3453286282693115e-6,2.348178747064766e-6,4.981079141923844e-9,3.821892654880514e-9,7.471691325731488e-9 -MultiIndexArray/64/250,4.4019827343098715e-6,4.387591663725577e-6,4.425614934485957e-6,5.9224790902980984e-8,3.479782330010645e-8,8.455292809417449e-8 -MultiIndexArray/64/500,7.555780912602089e-6,7.5530515161071374e-6,7.55965124938612e-6,1.1240956071385575e-8,8.075134111079232e-9,1.605913125459173e-8 -MultiIndexArray/64/750,1.0988654643429208e-5,1.097985216835205e-5,1.1003285243646568e-5,3.8651521323394404e-8,2.5323203949156553e-8,5.7081311064858004e-8 -MultiIndexArray/64/1024,1.4925245140520784e-5,1.4901245138610127e-5,1.4967510595876863e-5,1.0240670694498256e-7,7.98343876405743e-8,1.3949240804545363e-7 -MultiIndexArray/512/1,1.1527556352007257e-6,1.1514506249130631e-6,1.153924801204565e-6,4.04060509374668e-9,3.489175870822424e-9,4.6358771478541204e-9 -MultiIndexArray/512/10,1.2530367675424848e-6,1.2509156250590325e-6,1.2552250000897757e-6,7.481476234432133e-9,6.550257830484738e-9,8.594381858692776e-9 -MultiIndexArray/512/25,1.4470822913516626e-6,1.4445170170859284e-6,1.449654351574137e-6,8.535388950465679e-9,7.475993140417323e-9,9.916229484168065e-9 -MultiIndexArray/512/50,1.7860266336812464e-6,1.7845558967862729e-6,1.787113915572914e-6,4.19378464289336e-9,3.081080923198169e-9,6.13925434802263e-9 -MultiIndexArray/512/100,2.348260120281867e-6,2.347312129721325e-6,2.3495838941604693e-6,3.6923672341496392e-9,2.81746894813785e-9,5.46432950132547e-9 -MultiIndexArray/512/250,4.407948733486298e-6,4.398837498917281e-6,4.42762260295603e-6,4.214347400748363e-8,2.1774063477619383e-8,6.403044163337105e-8 -MultiIndexArray/512/500,7.5890150249631976e-6,7.586706727440724e-6,7.5946941542520136e-6,1.1987420430853104e-8,5.805545542883777e-9,2.2304827592606205e-8 -MultiIndexArray/512/750,1.1055958690236074e-5,1.1047176395723487e-5,1.1089939493880966e-5,4.950387574528014e-8,1.5914152386617788e-8,1.0767267915900636e-7 -MultiIndexArray/512/1024,1.504922194436156e-5,1.5009617984326364e-5,1.5089132496526255e-5,1.3708593238271758e-7,1.23061466728913e-7,1.5456148904635407e-7 -MultiIndexArray/4096/1,1.1659422936422449e-6,1.1646323804876866e-6,1.1676239590074063e-6,4.782690014225791e-9,3.9630979226262355e-9,6.026873405130029e-9 -MultiIndexArray/4096/10,1.2477604367106539e-6,1.2470135975131035e-6,1.2486809976497069e-6,2.7973719949519583e-9,2.2588326531799893e-9,3.4433243200998038e-9 -MultiIndexArray/4096/25,1.447470536374601e-6,1.4460669344012983e-6,1.4489159634626032e-6,4.86592057401329e-9,4.202785540354779e-9,5.849408898629097e-9 -MultiIndexArray/4096/50,1.8061784111630266e-6,1.8043873482296597e-6,1.807659837586612e-6,5.432190618658268e-9,4.441596288210413e-9,6.181813274502686e-9 -MultiIndexArray/4096/100,2.374662745299253e-6,2.3730275522291237e-6,2.3777255526309134e-6,6.900294001258807e-9,4.463544238843329e-9,1.2255395588066095e-8 -MultiIndexArray/4096/250,4.418659312618042e-6,4.413119267729342e-6,4.435684456090207e-6,2.940112537831096e-8,1.3308014280141493e-8,6.610773503113629e-8 -MultiIndexArray/4096/500,7.7368867339373e-6,7.729787662149866e-6,7.75256555282939e-6,3.289077427553084e-8,1.924809936831798e-8,5.455030686730152e-8 -MultiIndexArray/4096/750,1.1068118565046429e-5,1.106496438163906e-5,1.1072885146722067e-5,1.2522768961928092e-8,8.207208000996548e-9,2.1200002437522298e-8 -MultiIndexArray/4096/1024,1.5565936373508988e-5,1.5543936308015712e-5,1.558599359556228e-5,6.648302374742644e-8,5.512415367326135e-8,8.266177040674958e-8 -MultiIndexArray/32768/1,1.1442118749100567e-6,1.1429153156753545e-6,1.1453789743529375e-6,4.444501798758377e-9,3.7222018137592102e-9,5.438837644530105e-9 -MultiIndexArray/32768/10,1.2510844620437968e-6,1.2495733403222674e-6,1.2526061921954098e-6,5.096814049496851e-9,4.35751505155619e-9,6.248434865236724e-9 -MultiIndexArray/32768/25,1.4569907025488409e-6,1.4554512907760795e-6,1.4587819524546088e-6,5.465831291310908e-9,4.346928106990493e-9,6.873292058993824e-9 -MultiIndexArray/32768/50,1.7965470124482788e-6,1.795703179202068e-6,1.798402146963882e-6,3.819360633428033e-9,2.079569974223481e-9,7.127271440425662e-9 -MultiIndexArray/32768/100,2.358641609393669e-6,2.3578416234706424e-6,2.35962634437079e-6,2.992413464418773e-9,2.4619126858606067e-9,3.6058459953920658e-9 -MultiIndexArray/32768/250,4.427120848264317e-6,4.423604234669549e-6,4.432520100608272e-6,1.4051842273683851e-8,1.0079060677167914e-8,1.8630713959311536e-8 -MultiIndexArray/32768/500,7.721628708989058e-6,7.716175648304958e-6,7.737422217553131e-6,2.8213193930443687e-8,1.0751562276800433e-8,5.8873196040472184e-8 -MultiIndexArray/32768/750,1.139592718120966e-5,1.1382866530756265e-5,1.1427667730230221e-5,6.642226414626909e-8,3.1428518684276475e-8,1.2957948960962811e-7 -MultiIndexArray/32768/1024,1.5486302310270188e-5,1.5478026003463753e-5,1.549629815197244e-5,3.089860568353386e-8,2.511576085239483e-8,3.823059547794281e-8 -MultiIndexArray/131072/1,1.1443670294111724e-6,1.1414211667456032e-6,1.1468529723426467e-6,8.988654929002447e-9,7.357184877146283e-9,1.0988837634580134e-8 -MultiIndexArray/131072/10,1.251249143197141e-6,1.2496506983154136e-6,1.2524244544404756e-6,4.598318369178994e-9,3.873070735949209e-9,5.4399261049900215e-9 -MultiIndexArray/131072/25,1.4465138684447564e-6,1.4438560342187442e-6,1.4488287834483226e-6,8.122843170204174e-9,6.715844136717731e-9,9.690691515994419e-9 -MultiIndexArray/131072/50,1.8049862372089842e-6,1.8033467127237708e-6,1.807577440574238e-6,6.946744604649832e-9,4.9038684093989926e-9,1.1600114920454749e-8 -MultiIndexArray/131072/100,2.3704966871138352e-6,2.3686179221475926e-6,2.3742806962572076e-6,8.280281248169888e-9,3.544466619541016e-9,1.4795556993241789e-8 -MultiIndexArray/131072/250,4.455163768158035e-6,4.4383644687878855e-6,4.480088780250286e-6,6.757047112417767e-8,5.021585777436085e-8,8.552119664554594e-8 -MultiIndexArray/131072/500,7.83393937912142e-6,7.826063689330036e-6,7.847109850169159e-6,3.3509162849297415e-8,2.133063100562857e-8,6.07245051684096e-8 -MultiIndexArray/131072/750,1.1377361545062184e-5,1.1370729312454968e-5,1.1384900803691203e-5,2.4008284439028694e-8,1.9542272502157505e-8,2.8404349525387425e-8 -MultiIndexArray/131072/1024,1.6049734380231328e-5,1.602413559312261e-5,1.6081513645032104e-5,9.361805411979241e-8,6.733175740629124e-8,1.4114074905053748e-7 -MultiIndexArray/4096/999,1.4789441558835284e-5,1.47778160472742e-5,1.4801605797364698e-5,3.867171850071451e-8,3.345660996292965e-8,4.471990796888468e-8 -MultiIndexArray/4096/1001,1.4545922742783325e-5,1.453923808680616e-5,1.4562397707133496e-5,3.126741639016404e-8,1.4253745645309097e-8,6.367752610387337e-8 -MultiIndexArray/1024/867,1.2642046694070955e-5,1.2631422143775583e-5,1.2662495323148883e-5,4.654398952230348e-8,2.505840992813632e-8,7.898074246945364e-8 -MultiIndexArray/256/775,1.1370207034463876e-5,1.1364525398479695e-5,1.138972677176069e-5,3.021608860513275e-8,1.2467249694476118e-8,6.330813757053513e-8 -MultiIndexArray/16/620,9.225464988380843e-6,9.22388060409586e-6,9.228657606879182e-6,7.40861389941133e-9,4.1469624532797085e-9,1.447241949998678e-8 -MultiIndexArray/4/173,3.4098050646158024e-6,3.407435161900946e-6,3.4133315033117806e-6,9.431138085713181e-9,6.041978811938664e-9,1.418573928169077e-8 -MultiIndexArray/16/661,9.794797170061117e-6,9.787372634676152e-6,9.809722654800189e-6,3.286393274565099e-8,1.8783173363326394e-8,5.647114746250231e-8 -MultiIndexArray/8/454,7.026774106165151e-6,7.0206085741047705e-6,7.040176255823725e-6,2.8375919202405957e-8,1.4750933042429769e-8,4.9591894004401995e-8 -MultiIndexArray/4/13,1.2709755276894385e-6,1.2695727355464374e-6,1.272147270886599e-6,4.4071438687054775e-9,3.6744199466214972e-9,5.351414243946174e-9 -MultiIndexArray/4096/98,2.546145112309477e-6,2.5452187686401855e-6,2.5489395648131663e-6,4.752943388543214e-9,2.0351264475807154e-9,9.209475913457533e-9 -MultiIndexArray/128/224,3.9991343947638395e-6,3.997494555885715e-6,4.001621012264542e-6,6.7085648796114556e-9,4.43924487865813e-9,1.2149994518952555e-8 -MultiIndexArray/256/233,4.13439842457604e-6,4.128140285070202e-6,4.149688727139482e-6,3.0278512809042937e-8,1.2593662648764933e-8,5.985191770367273e-8 -MultiIndexArray/64/410,6.374868359790827e-6,6.373807315152049e-6,6.376161173348465e-6,3.810808811706594e-9,3.091827777824528e-9,5.356574992669085e-9 -MultiIndexArray/32768/549,8.428633484195374e-6,8.422316513023385e-6,8.43884250069457e-6,2.6186676437473622e-8,1.7491315617432106e-8,4.083033481629228e-8 -MultiIndexArray/131072/786,1.1921437372725448e-5,1.1898462946909749e-5,1.1998931570470359e-5,1.260901191912041e-7,3.924536263553387e-8,2.5426536133631233e-7 -MultiIndexArray/2048/970,1.413636810287825e-5,1.4129537106025755e-5,1.4161488725983108e-5,3.948633155428906e-8,7.753354329962224e-9,8.221265346844969e-8 -MultiIndexArray/32/489,7.597829239343391e-6,7.596838953601304e-6,7.599959892387123e-6,4.632655887294582e-9,3.0404889079915104e-9,8.301312402449808e-9 -MultiIndexArray/1024/464,7.235339245958312e-6,7.231881990020842e-6,7.251586602142297e-6,2.0596087734201246e-8,4.19866173692028e-9,4.612132407690079e-8 -MultiIndexArray/16/908,1.2965338637335267e-5,1.2962223852435903e-5,1.2969942093666356e-5,1.2281015104782374e-8,8.851667124906099e-9,2.0839897565944812e-8 -MultiIndexArray/32/602,9.04184534010077e-6,8.9980912578961e-6,9.096332373031725e-6,1.5692710118665394e-7,1.2532364853034672e-7,1.7493742123312588e-7 -MultiIndexArray/65536/324,5.394744417456079e-6,5.389154289445253e-6,5.399931993875937e-6,1.7835441034887347e-8,1.512061686942987e-8,2.1369852532349164e-8 -MultiIndexArray/16384/1022,1.5214879395896596e-5,1.5200999436163753e-5,1.5245503823056541e-5,6.461143288273993e-8,3.207004839266697e-8,1.1386055611230044e-7 -MultiIndexArray/4/515,7.742599363251311e-6,7.740087346015041e-6,7.744880693529653e-6,8.332255633313667e-9,7.023777325522468e-9,1.0022202742354909e-8 -MultiIndexArray/8192/658,9.940402792838052e-6,9.928604105037563e-6,9.954624170305187e-6,4.6902904164167746e-8,3.962372124360666e-8,6.311920217399187e-8 -MultiIndexArray/16384/941,1.4006703705541126e-5,1.398749589361836e-5,1.4046038758441937e-5,8.487144770977613e-8,5.133324620933133e-8,1.314717171536047e-7 -MultiIndexArray/16/774,1.1339796688007948e-5,1.1328605176330937e-5,1.1376410662522726e-5,6.135478931246042e-8,2.2079924254086365e-8,1.2079621515624513e-7 -MultiIndexArray/1/425,6.572720855758919e-6,6.5715744287587915e-6,6.574036001820685e-6,4.008672060608976e-9,3.398592881043319e-9,5.152788211322869e-9 -MultiIndexArray/8192/827,1.2281151655003307e-5,1.2264704760056674e-5,1.2302845041120058e-5,6.507794649538153e-8,4.806722490732972e-8,9.393159819400056e-8 -MultiIndexArray/32/705,1.0323877888547536e-5,1.0317909348220948e-5,1.034935411532433e-5,3.053055813809434e-8,8.425591339325476e-9,6.595764228174158e-8 -MultiIndexArray/16/949,1.3824903771061375e-5,1.3815513405293382e-5,1.385417458841762e-5,5.1372436686546315e-8,2.5152637266590445e-8,9.687264653895768e-8 -MultiIndexArray/128/328,5.334622633280017e-6,5.333991431749496e-6,5.3358976046755226e-6,2.8467272511116763e-9,1.6969230283617593e-9,5.138433505964031e-9 -MultiIndexArray/65536/725,1.0943713445853346e-5,1.0937959063756426e-5,1.0957840855892036e-5,2.8776884592752538e-8,1.6318604775960734e-8,5.120688798492994e-8 -MultiIndexArray/1/506,7.63568573634145e-6,7.63431169943277e-6,7.63812585511423e-6,5.8761565615779505e-9,3.795232532088791e-9,1.0109502357248655e-8 -MultiIndexArray/8192/906,1.3411492647205673e-5,1.3396510135893873e-5,1.3434577665643676e-5,6.104940240595826e-8,3.893531706600767e-8,9.713250436916311e-8 -MultiIndexArray/32/614,9.07495501332408e-6,9.072319707086233e-6,9.079090312050031e-6,1.06783990370048e-8,8.063737568798561e-9,1.4927335061252403e-8 -MultiIndexArray/32/833,1.2057130286916994e-5,1.2052403467375013e-5,1.2061728688899934e-5,1.636102240985875e-8,1.308015524574202e-8,2.1508468818173294e-8 -MultiIndexArray/512/96,2.505308434064276e-6,2.5043320407326853e-6,2.5066058240709426e-6,3.6342996778597264e-9,2.6930203937090098e-9,4.900612851188735e-9 -MultiIndexArray/1024/478,7.410305407994785e-6,7.401352528236747e-6,7.424024407325522e-6,3.603010998252291e-8,2.2008678131157995e-8,5.335748278424885e-8 -MultiIndexArray/128/656,9.742384457259018e-6,9.738226628587493e-6,9.758796384809515e-6,2.3313260937538578e-8,7.552359038332978e-9,4.9666175431553376e-8 -MultiIndexArray/2048/250,4.545746465191931e-6,4.542337915786206e-6,4.549915914643576e-6,1.2382943128493691e-8,7.933523427199416e-9,1.884083220446766e-8 -MultiIndexArray/2048/500,8.030964088467131e-6,8.027945849897267e-6,8.038003334134253e-6,1.4344883735867401e-8,7.222525582368531e-9,2.708292118501812e-8 -MultiIndexArray/2048/1024,1.5908025068953797e-5,1.5891687337303956e-5,1.595130243978917e-5,8.451021253065874e-8,3.66756042104449e-8,1.6477584846151207e-7 +MultiIndexArray/1/1,1.156430143781973e-6,1.1554242125407608e-6,1.1576048857562016e-6,3.6715593464992983e-9,3.0666155646291575e-9,4.650942969459808e-9 +MultiIndexArray/1/10,1.2553944661796063e-6,1.2540890100100102e-6,1.2586028198471012e-6,6.52468606378491e-9,3.508024465897203e-9,1.2296390844996928e-8 +MultiIndexArray/1/25,1.4528979146564945e-6,1.450854612295361e-6,1.4548086481436988e-6,6.694845699662592e-9,5.922711853444038e-9,7.781447437593305e-9 +MultiIndexArray/1/50,1.7949405547174779e-6,1.7932284409833384e-6,1.797389454081368e-6,6.7426314440037044e-9,5.133266179059529e-9,9.261768979077419e-9 +MultiIndexArray/1/100,2.335382784866838e-6,2.3339823091205926e-6,2.338966695092019e-6,6.985870774711276e-9,3.3756295285080243e-9,1.4731216237721948e-8 +MultiIndexArray/1/250,4.376586417510226e-6,4.373858682775094e-6,4.389037408986428e-6,1.6147107036773836e-8,3.3108501134513076e-9,3.6424667943555515e-8 +MultiIndexArray/1/500,7.529346420677418e-6,7.528196718661825e-6,7.530908827837125e-6,4.720590443797592e-9,3.514223756190818e-9,6.892750346987006e-9 +MultiIndexArray/1/750,1.1009190839349332e-5,1.100447972104189e-5,1.1019060895859785e-5,2.3215495344605778e-8,1.4189047687549464e-8,3.821035635665834e-8 +MultiIndexArray/1/1024,1.4772151402554726e-5,1.4765981540866543e-5,1.47826661329378e-5,2.6997193786795927e-8,1.6275981887173326e-8,4.314445821696222e-8 +MultiIndexArray/8/1,1.154429834379474e-6,1.1535638143662093e-6,1.1552144206470173e-6,2.7940566316976028e-9,2.3608072430144144e-9,3.556885194599204e-9 +MultiIndexArray/8/10,1.2681123397849882e-6,1.2672398144238425e-6,1.2689740433679784e-6,2.997162635218807e-9,2.5585856217946513e-9,3.5484369043064897e-9 +MultiIndexArray/8/25,1.447594714042571e-6,1.4452396550114581e-6,1.4503937175416122e-6,8.330209849763002e-9,7.556637396879305e-9,9.11484235334071e-9 +MultiIndexArray/8/50,1.783881181793763e-6,1.783182890860542e-6,1.7850395715103563e-6,2.8760448497392878e-9,2.2300061601385706e-9,4.343738626243217e-9 +MultiIndexArray/8/100,2.3530737901147577e-6,2.3512553228625093e-6,2.3550161318844e-6,6.215120756527708e-9,4.8022138908084105e-9,9.300506753648837e-9 +MultiIndexArray/8/250,4.385567049451296e-6,4.378640261634477e-6,4.411980611849529e-6,3.680889226790899e-8,6.510277914976513e-9,7.984717385673577e-8 +MultiIndexArray/8/500,7.594031462566146e-6,7.58855650282319e-6,7.622001469221313e-6,3.111275435572256e-8,5.764541357475308e-9,7.430320679452689e-8 +MultiIndexArray/8/750,1.1007325955430895e-5,1.0985633356991794e-5,1.1058413840756636e-5,9.85444115541363e-8,3.860237931953995e-8,1.6833217534956573e-7 +MultiIndexArray/8/1024,1.5007676569837957e-5,1.4994506269073943e-5,1.5026164720376812e-5,5.2871593061357907e-8,4.3390323910853545e-8,6.692611220554551e-8 +MultiIndexArray/64/1,1.159114284620975e-6,1.1581282544381744e-6,1.1601405988731175e-6,3.152152345061858e-9,2.480780727803682e-9,4.054487437081387e-9 +MultiIndexArray/64/10,1.2403077310719796e-6,1.2385817161614763e-6,1.2421738961032788e-6,6.0036829395468816e-9,5.2849611905711335e-9,6.9781798921450465e-9 +MultiIndexArray/64/25,1.4506134420369243e-6,1.449024435284276e-6,1.4517318818521657e-6,4.4319962962801846e-9,3.112553700714273e-9,6.190009294397226e-9 +MultiIndexArray/64/50,1.77948469077602e-6,1.7789515010014516e-6,1.780088067474157e-6,1.935775115941161e-9,1.4163231991436661e-9,2.9848090268929233e-9 +MultiIndexArray/64/100,2.3466317492465594e-6,2.3453286282693115e-6,2.348178747064766e-6,4.981079141923844e-9,3.821892654880514e-9,7.471691325731488e-9 +MultiIndexArray/64/250,4.4019827343098715e-6,4.387591663725577e-6,4.425614934485957e-6,5.9224790902980984e-8,3.479782330010645e-8,8.455292809417449e-8 +MultiIndexArray/64/500,7.555780912602089e-6,7.5530515161071374e-6,7.55965124938612e-6,1.1240956071385575e-8,8.075134111079232e-9,1.605913125459173e-8 +MultiIndexArray/64/750,1.0988654643429208e-5,1.097985216835205e-5,1.1003285243646568e-5,3.8651521323394404e-8,2.5323203949156553e-8,5.7081311064858004e-8 +MultiIndexArray/64/1024,1.4925245140520784e-5,1.4901245138610127e-5,1.4967510595876863e-5,1.0240670694498256e-7,7.98343876405743e-8,1.3949240804545363e-7 +MultiIndexArray/512/1,1.1527556352007257e-6,1.1514506249130631e-6,1.153924801204565e-6,4.04060509374668e-9,3.489175870822424e-9,4.6358771478541204e-9 +MultiIndexArray/512/10,1.2530367675424848e-6,1.2509156250590325e-6,1.2552250000897757e-6,7.481476234432133e-9,6.550257830484738e-9,8.594381858692776e-9 +MultiIndexArray/512/25,1.4470822913516626e-6,1.4445170170859284e-6,1.449654351574137e-6,8.535388950465679e-9,7.475993140417323e-9,9.916229484168065e-9 +MultiIndexArray/512/50,1.7860266336812464e-6,1.7845558967862729e-6,1.787113915572914e-6,4.19378464289336e-9,3.081080923198169e-9,6.13925434802263e-9 +MultiIndexArray/512/100,2.348260120281867e-6,2.347312129721325e-6,2.3495838941604693e-6,3.6923672341496392e-9,2.81746894813785e-9,5.46432950132547e-9 +MultiIndexArray/512/250,4.407948733486298e-6,4.398837498917281e-6,4.42762260295603e-6,4.214347400748363e-8,2.1774063477619383e-8,6.403044163337105e-8 +MultiIndexArray/512/500,7.5890150249631976e-6,7.586706727440724e-6,7.5946941542520136e-6,1.1987420430853104e-8,5.805545542883777e-9,2.2304827592606205e-8 +MultiIndexArray/512/750,1.1055958690236074e-5,1.1047176395723487e-5,1.1089939493880966e-5,4.950387574528014e-8,1.5914152386617788e-8,1.0767267915900636e-7 +MultiIndexArray/512/1024,1.504922194436156e-5,1.5009617984326364e-5,1.5089132496526255e-5,1.3708593238271758e-7,1.23061466728913e-7,1.5456148904635407e-7 +MultiIndexArray/4096/1,1.1659422936422449e-6,1.1646323804876866e-6,1.1676239590074063e-6,4.782690014225791e-9,3.9630979226262355e-9,6.026873405130029e-9 +MultiIndexArray/4096/10,1.2477604367106539e-6,1.2470135975131035e-6,1.2486809976497069e-6,2.7973719949519583e-9,2.2588326531799893e-9,3.4433243200998038e-9 +MultiIndexArray/4096/25,1.447470536374601e-6,1.4460669344012983e-6,1.4489159634626032e-6,4.86592057401329e-9,4.202785540354779e-9,5.849408898629097e-9 +MultiIndexArray/4096/50,1.8061784111630266e-6,1.8043873482296597e-6,1.807659837586612e-6,5.432190618658268e-9,4.441596288210413e-9,6.181813274502686e-9 +MultiIndexArray/4096/100,2.374662745299253e-6,2.3730275522291237e-6,2.3777255526309134e-6,6.900294001258807e-9,4.463544238843329e-9,1.2255395588066095e-8 +MultiIndexArray/4096/250,4.418659312618042e-6,4.413119267729342e-6,4.435684456090207e-6,2.940112537831096e-8,1.3308014280141493e-8,6.610773503113629e-8 +MultiIndexArray/4096/500,7.7368867339373e-6,7.729787662149866e-6,7.75256555282939e-6,3.289077427553084e-8,1.924809936831798e-8,5.455030686730152e-8 +MultiIndexArray/4096/750,1.1068118565046429e-5,1.106496438163906e-5,1.1072885146722067e-5,1.2522768961928092e-8,8.207208000996548e-9,2.1200002437522298e-8 +MultiIndexArray/4096/1024,1.5565936373508988e-5,1.5543936308015712e-5,1.558599359556228e-5,6.648302374742644e-8,5.512415367326135e-8,8.266177040674958e-8 +MultiIndexArray/32768/1,1.1442118749100567e-6,1.1429153156753545e-6,1.1453789743529375e-6,4.444501798758377e-9,3.7222018137592102e-9,5.438837644530105e-9 +MultiIndexArray/32768/10,1.2510844620437968e-6,1.2495733403222674e-6,1.2526061921954098e-6,5.096814049496851e-9,4.35751505155619e-9,6.248434865236724e-9 +MultiIndexArray/32768/25,1.4569907025488409e-6,1.4554512907760795e-6,1.4587819524546088e-6,5.465831291310908e-9,4.346928106990493e-9,6.873292058993824e-9 +MultiIndexArray/32768/50,1.7965470124482788e-6,1.795703179202068e-6,1.798402146963882e-6,3.819360633428033e-9,2.079569974223481e-9,7.127271440425662e-9 +MultiIndexArray/32768/100,2.358641609393669e-6,2.3578416234706424e-6,2.35962634437079e-6,2.992413464418773e-9,2.4619126858606067e-9,3.6058459953920658e-9 +MultiIndexArray/32768/250,4.427120848264317e-6,4.423604234669549e-6,4.432520100608272e-6,1.4051842273683851e-8,1.0079060677167914e-8,1.8630713959311536e-8 +MultiIndexArray/32768/500,7.721628708989058e-6,7.716175648304958e-6,7.737422217553131e-6,2.8213193930443687e-8,1.0751562276800433e-8,5.8873196040472184e-8 +MultiIndexArray/32768/750,1.139592718120966e-5,1.1382866530756265e-5,1.1427667730230221e-5,6.642226414626909e-8,3.1428518684276475e-8,1.2957948960962811e-7 +MultiIndexArray/32768/1024,1.5486302310270188e-5,1.5478026003463753e-5,1.549629815197244e-5,3.089860568353386e-8,2.511576085239483e-8,3.823059547794281e-8 +MultiIndexArray/131072/1,1.1443670294111724e-6,1.1414211667456032e-6,1.1468529723426467e-6,8.988654929002447e-9,7.357184877146283e-9,1.0988837634580134e-8 +MultiIndexArray/131072/10,1.251249143197141e-6,1.2496506983154136e-6,1.2524244544404756e-6,4.598318369178994e-9,3.873070735949209e-9,5.4399261049900215e-9 +MultiIndexArray/131072/25,1.4465138684447564e-6,1.4438560342187442e-6,1.4488287834483226e-6,8.122843170204174e-9,6.715844136717731e-9,9.690691515994419e-9 +MultiIndexArray/131072/50,1.8049862372089842e-6,1.8033467127237708e-6,1.807577440574238e-6,6.946744604649832e-9,4.9038684093989926e-9,1.1600114920454749e-8 +MultiIndexArray/131072/100,2.3704966871138352e-6,2.3686179221475926e-6,2.3742806962572076e-6,8.280281248169888e-9,3.544466619541016e-9,1.4795556993241789e-8 +MultiIndexArray/131072/250,4.455163768158035e-6,4.4383644687878855e-6,4.480088780250286e-6,6.757047112417767e-8,5.021585777436085e-8,8.552119664554594e-8 +MultiIndexArray/131072/500,7.83393937912142e-6,7.826063689330036e-6,7.847109850169159e-6,3.3509162849297415e-8,2.133063100562857e-8,6.07245051684096e-8 +MultiIndexArray/131072/750,1.1377361545062184e-5,1.1370729312454968e-5,1.1384900803691203e-5,2.4008284439028694e-8,1.9542272502157505e-8,2.8404349525387425e-8 +MultiIndexArray/131072/1024,1.6049734380231328e-5,1.602413559312261e-5,1.6081513645032104e-5,9.361805411979241e-8,6.733175740629124e-8,1.4114074905053748e-7 +MultiIndexArray/4096/999,1.4789441558835284e-5,1.47778160472742e-5,1.4801605797364698e-5,3.867171850071451e-8,3.345660996292965e-8,4.471990796888468e-8 +MultiIndexArray/4096/1001,1.4545922742783325e-5,1.453923808680616e-5,1.4562397707133496e-5,3.126741639016404e-8,1.4253745645309097e-8,6.367752610387337e-8 +MultiIndexArray/1024/867,1.2642046694070955e-5,1.2631422143775583e-5,1.2662495323148883e-5,4.654398952230348e-8,2.505840992813632e-8,7.898074246945364e-8 +MultiIndexArray/256/775,1.1370207034463876e-5,1.1364525398479695e-5,1.138972677176069e-5,3.021608860513275e-8,1.2467249694476118e-8,6.330813757053513e-8 +MultiIndexArray/16/620,9.225464988380843e-6,9.22388060409586e-6,9.228657606879182e-6,7.40861389941133e-9,4.1469624532797085e-9,1.447241949998678e-8 +MultiIndexArray/4/173,3.4098050646158024e-6,3.407435161900946e-6,3.4133315033117806e-6,9.431138085713181e-9,6.041978811938664e-9,1.418573928169077e-8 +MultiIndexArray/16/661,9.794797170061117e-6,9.787372634676152e-6,9.809722654800189e-6,3.286393274565099e-8,1.8783173363326394e-8,5.647114746250231e-8 +MultiIndexArray/8/454,7.026774106165151e-6,7.0206085741047705e-6,7.040176255823725e-6,2.8375919202405957e-8,1.4750933042429769e-8,4.9591894004401995e-8 +MultiIndexArray/4/13,1.2709755276894385e-6,1.2695727355464374e-6,1.272147270886599e-6,4.4071438687054775e-9,3.6744199466214972e-9,5.351414243946174e-9 +MultiIndexArray/4096/98,2.546145112309477e-6,2.5452187686401855e-6,2.5489395648131663e-6,4.752943388543214e-9,2.0351264475807154e-9,9.209475913457533e-9 +MultiIndexArray/128/224,3.9991343947638395e-6,3.997494555885715e-6,4.001621012264542e-6,6.7085648796114556e-9,4.43924487865813e-9,1.2149994518952555e-8 +MultiIndexArray/256/233,4.13439842457604e-6,4.128140285070202e-6,4.149688727139482e-6,3.0278512809042937e-8,1.2593662648764933e-8,5.985191770367273e-8 +MultiIndexArray/64/410,6.374868359790827e-6,6.373807315152049e-6,6.376161173348465e-6,3.810808811706594e-9,3.091827777824528e-9,5.356574992669085e-9 +MultiIndexArray/32768/549,8.428633484195374e-6,8.422316513023385e-6,8.43884250069457e-6,2.6186676437473622e-8,1.7491315617432106e-8,4.083033481629228e-8 +MultiIndexArray/131072/786,1.1921437372725448e-5,1.1898462946909749e-5,1.1998931570470359e-5,1.260901191912041e-7,3.924536263553387e-8,2.5426536133631233e-7 +MultiIndexArray/2048/970,1.413636810287825e-5,1.4129537106025755e-5,1.4161488725983108e-5,3.948633155428906e-8,7.753354329962224e-9,8.221265346844969e-8 +MultiIndexArray/32/489,7.597829239343391e-6,7.596838953601304e-6,7.599959892387123e-6,4.632655887294582e-9,3.0404889079915104e-9,8.301312402449808e-9 +MultiIndexArray/1024/464,7.235339245958312e-6,7.231881990020842e-6,7.251586602142297e-6,2.0596087734201246e-8,4.19866173692028e-9,4.612132407690079e-8 +MultiIndexArray/16/908,1.2965338637335267e-5,1.2962223852435903e-5,1.2969942093666356e-5,1.2281015104782374e-8,8.851667124906099e-9,2.0839897565944812e-8 +MultiIndexArray/32/602,9.04184534010077e-6,8.9980912578961e-6,9.096332373031725e-6,1.5692710118665394e-7,1.2532364853034672e-7,1.7493742123312588e-7 +MultiIndexArray/65536/324,5.394744417456079e-6,5.389154289445253e-6,5.399931993875937e-6,1.7835441034887347e-8,1.512061686942987e-8,2.1369852532349164e-8 +MultiIndexArray/16384/1022,1.5214879395896596e-5,1.5200999436163753e-5,1.5245503823056541e-5,6.461143288273993e-8,3.207004839266697e-8,1.1386055611230044e-7 +MultiIndexArray/4/515,7.742599363251311e-6,7.740087346015041e-6,7.744880693529653e-6,8.332255633313667e-9,7.023777325522468e-9,1.0022202742354909e-8 +MultiIndexArray/8192/658,9.940402792838052e-6,9.928604105037563e-6,9.954624170305187e-6,4.6902904164167746e-8,3.962372124360666e-8,6.311920217399187e-8 +MultiIndexArray/16384/941,1.4006703705541126e-5,1.398749589361836e-5,1.4046038758441937e-5,8.487144770977613e-8,5.133324620933133e-8,1.314717171536047e-7 +MultiIndexArray/16/774,1.1339796688007948e-5,1.1328605176330937e-5,1.1376410662522726e-5,6.135478931246042e-8,2.2079924254086365e-8,1.2079621515624513e-7 +MultiIndexArray/1/425,6.572720855758919e-6,6.5715744287587915e-6,6.574036001820685e-6,4.008672060608976e-9,3.398592881043319e-9,5.152788211322869e-9 +MultiIndexArray/8192/827,1.2281151655003307e-5,1.2264704760056674e-5,1.2302845041120058e-5,6.507794649538153e-8,4.806722490732972e-8,9.393159819400056e-8 +MultiIndexArray/32/705,1.0323877888547536e-5,1.0317909348220948e-5,1.034935411532433e-5,3.053055813809434e-8,8.425591339325476e-9,6.595764228174158e-8 +MultiIndexArray/16/949,1.3824903771061375e-5,1.3815513405293382e-5,1.385417458841762e-5,5.1372436686546315e-8,2.5152637266590445e-8,9.687264653895768e-8 +MultiIndexArray/128/328,5.334622633280017e-6,5.333991431749496e-6,5.3358976046755226e-6,2.8467272511116763e-9,1.6969230283617593e-9,5.138433505964031e-9 +MultiIndexArray/65536/725,1.0943713445853346e-5,1.0937959063756426e-5,1.0957840855892036e-5,2.8776884592752538e-8,1.6318604775960734e-8,5.120688798492994e-8 +MultiIndexArray/1/506,7.63568573634145e-6,7.63431169943277e-6,7.63812585511423e-6,5.8761565615779505e-9,3.795232532088791e-9,1.0109502357248655e-8 +MultiIndexArray/8192/906,1.3411492647205673e-5,1.3396510135893873e-5,1.3434577665643676e-5,6.104940240595826e-8,3.893531706600767e-8,9.713250436916311e-8 +MultiIndexArray/32/614,9.07495501332408e-6,9.072319707086233e-6,9.079090312050031e-6,1.06783990370048e-8,8.063737568798561e-9,1.4927335061252403e-8 +MultiIndexArray/32/833,1.2057130286916994e-5,1.2052403467375013e-5,1.2061728688899934e-5,1.636102240985875e-8,1.308015524574202e-8,2.1508468818173294e-8 +MultiIndexArray/512/96,2.505308434064276e-6,2.5043320407326853e-6,2.5066058240709426e-6,3.6342996778597264e-9,2.6930203937090098e-9,4.900612851188735e-9 +MultiIndexArray/1024/478,7.410305407994785e-6,7.401352528236747e-6,7.424024407325522e-6,3.603010998252291e-8,2.2008678131157995e-8,5.335748278424885e-8 +MultiIndexArray/128/656,9.742384457259018e-6,9.738226628587493e-6,9.758796384809515e-6,2.3313260937538578e-8,7.552359038332978e-9,4.9666175431553376e-8 +MultiIndexArray/2048/250,4.545746465191931e-6,4.542337915786206e-6,4.549915914643576e-6,1.2382943128493691e-8,7.933523427199416e-9,1.884083220446766e-8 +MultiIndexArray/2048/500,8.030964088467131e-6,8.027945849897267e-6,8.038003334134253e-6,1.4344883735867401e-8,7.222525582368531e-9,2.708292118501812e-8 +MultiIndexArray/2048/1024,1.5908025068953797e-5,1.5891687337303956e-5,1.595130243978917e-5,8.451021253065874e-8,3.66756042104449e-8,1.6477584846151207e-7 AssetCount/0,7.9689250363202e-7,7.963503093789315e-7,7.975899396259693e-7,2.041888369621938e-9,1.4060621316365501e-9,3.2304452329855548e-9 AssetCount/12492,7.958570204314647e-7,7.948672993015391e-7,7.968883892611085e-7,3.5261064833693767e-9,3.0907487977641316e-9,4.136838654433464e-9 AssetCount/2724,7.993676021976337e-7,7.984620760998596e-7,8.002166225380534e-7,2.9083171719092463e-9,2.418405721441283e-9,3.39910458411974e-9 @@ -14882,3 +14882,114 @@ AssetCount/7382,8.031355944689982e-7,8.026411882351436e-7,8.036332128930176e-7,1 AssetCount/84,7.989127820157715e-7,7.976062135990581e-7,8.005459859534217e-7,4.913135323105458e-9,4.135854671762823e-9,5.94011959254269e-9 AssetCount/9240,7.989415006078473e-7,7.985031474075421e-7,7.994020815431888e-7,1.562219100807065e-9,1.3503723573527174e-9,1.8176185699238456e-9 AssetCount/7927,8.006547687576905e-7,8.002630830374664e-7,8.012562452793451e-7,1.630654955700339e-9,1.1581984445217186e-9,2.501958944398891e-9 +Policies/0,9.481394959218237e-7,9.469858265585026e-7,9.49105656325964e-7,3.4529741724142777e-9,2.7729170511652633e-9,5.12013063463545e-9 +Policies/18,1.262642363726381e-6,1.261023324938321e-6,1.2653068090615992e-6,6.756085465570569e-9,4.760181138737469e-9,1.164744546447202e-8 +Policies/197,3.6758842648574276e-6,3.667140730970818e-6,3.6850461933517123e-6,3.1483681146185075e-8,2.5551130612840504e-8,3.9096102750886324e-8 +Policies/1939,2.8874408411020066e-5,2.875875286876649e-5,2.898071932821872e-5,3.722339244003543e-7,3.1037829877025923e-7,4.541241288501347e-7 +Policies/328,5.680809031429537e-6,5.665462769259303e-6,5.69740397948811e-6,5.343861166014618e-8,4.204326172647914e-8,7.548206260510888e-8 +Policies/8,1.111705604884003e-6,1.1102012818901404e-6,1.114954836962785e-6,6.836799714916832e-9,3.920086611558386e-9,1.2570090450900116e-8 +Policies/386,6.19429402961288e-6,6.168673246863e-6,6.215977985888304e-6,7.816404651480252e-8,6.516455195613328e-8,9.366805110425478e-8 +Policies/490,7.508467373661541e-6,7.489540419571915e-6,7.5325497650048275e-6,7.318357209351671e-8,5.744159274862825e-8,1.0081566160327879e-7 +Policies/14,1.2039830468101906e-6,1.2023045422886725e-6,1.205433238642055e-6,5.258339936025659e-9,4.575390613833121e-9,5.915363429318477e-9 +Policies/28,1.3921004761601977e-6,1.3883905601937988e-6,1.3958787614964348e-6,1.2614871515224917e-8,1.0495750650093213e-8,1.6300112348791286e-8 +Policies/8,1.1121541208412487e-6,1.1107231473109536e-6,1.1133548190129555e-6,4.43826409872822e-9,3.859990542388197e-9,5.545785463886648e-9 +Policies/2167,3.1402431567151565e-5,3.127933341830077e-5,3.153070417153969e-5,4.359788105547456e-7,3.4815504731509286e-7,5.466050983259786e-7 +Policies/4208,6.038247299228032e-5,6.018813417306409e-5,6.064925990846723e-5,7.900939724693463e-7,5.482468809019674e-7,1.1267458354656325e-6 +Policies/1149,1.6962242456022142e-5,1.687088574088752e-5,1.7060918161343155e-5,3.4267869404554525e-7,3.0606383581935315e-7,3.946844951655229e-7 +Policies/6,1.0868158092885216e-6,1.0860730443090693e-6,1.0873990588330185e-6,2.1050520436874437e-9,1.7039774878884312e-9,3.2813079176286712e-9 +Policies/2798,3.9720664887394435e-5,3.951774470331377e-5,3.99530724323829e-5,7.420450698733237e-7,5.930561231811107e-7,1.0038626419602473e-6 +Policies/2325,3.272927144423847e-5,3.2582050132188325e-5,3.295015404452499e-5,5.883432068750557e-7,4.1257282314152684e-7,1.0120072225855966e-6 +Policies/18,1.266216317513421e-6,1.2646942678407486e-6,1.2691236273287315e-6,6.815545846744264e-9,4.112885925087437e-9,1.2197725293593357e-8 +Policies/32266,4.2487268189560863e-4,4.2413224483968165e-4,4.2612040702911266e-4,3.063568261742826e-6,1.8924923765962792e-6,4.997874795200902e-6 +Policies/10,1.1448924242218497e-6,1.1434740565438691e-6,1.1483910945454938e-6,7.091389329294549e-9,3.21629614525966e-9,1.2841490260880746e-8 +Policies/768,1.1275234528756326e-5,1.1237599232904866e-5,1.1346892646545078e-5,1.7668444993295468e-7,1.2059850943151225e-7,3.093328811217085e-7 +Policies/8,1.1067675589894488e-6,1.1054208966020098e-6,1.1103177677954715e-6,6.892438625862442e-9,3.502281012572103e-9,1.2990172752171045e-8 +Policies/3741,5.247014031030008e-5,5.235034132138192e-5,5.259744242271294e-5,4.295098499093797e-7,3.5388124995384276e-7,5.723848809055454e-7 +Policies/11575,1.5592578510449198e-4,1.5576663495917253e-4,1.5629136759645165e-4,8.252275173814504e-7,3.920970820790552e-7,1.5784140911069718e-6 +Policies/12,1.1663558756170962e-6,1.1648667974598502e-6,1.1678047120999236e-6,4.825280803718589e-9,4.1115131289643886e-9,5.646485885185484e-9 +Policies/8047,1.087691266197217e-4,1.084243792598141e-4,1.0928022763585892e-4,1.4812607541497066e-6,9.79760240258728e-7,2.2287378944835973e-6 +Policies/262,4.648632581899121e-6,4.637139391869396e-6,4.660311018960129e-6,3.939602499202767e-8,3.237312289570899e-8,5.067217376588052e-8 +Policies/1,9.810323048494306e-7,9.79320026050483e-7,9.871935797967443e-7,9.828064165327516e-9,2.717638664455636e-9,2.0137883126348365e-8 +Policies/2700,3.932293391188614e-5,3.915124596122533e-5,3.948476108415688e-5,5.602652264664164e-7,4.632904158742926e-7,7.257283740057898e-7 +Policies/4913,6.735636125688912e-5,6.729311706018009e-5,6.744148887229721e-5,2.4167172945854726e-7,1.9349544367309554e-7,3.0521650182595807e-7 +Policies/45,1.6526305421817977e-6,1.6504640734509774e-6,1.6543469339096665e-6,6.381984711770252e-9,5.214352481435043e-9,7.990544696110263e-9 +Policies/376,6.246172264059072e-6,6.229480351605949e-6,6.2661953073161375e-6,6.240951362879686e-8,4.984852772692683e-8,8.687307285394701e-8 +Policies/5,1.0561389717894376e-6,1.0553224041069024e-6,1.0569484661231752e-6,2.685048465666796e-9,2.26498373019722e-9,3.3049189232177975e-9 +Policies/14348,1.9256582681916184e-4,1.9235176800444005e-4,1.9283180609900487e-4,8.42623221248826e-7,5.953065425090794e-7,1.416386327055534e-6 +Policies/7,1.1035588128092447e-6,1.1022958294460652e-6,1.104990065065734e-6,4.485568161898047e-9,3.775190654133087e-9,5.329540467011371e-9 +Policies/36468,4.7648122659202537e-4,4.7591711007208054e-4,4.7708496614729424e-4,1.999980878319297e-6,1.491502460002565e-6,2.81809586159482e-6 +Policies/3,1.0231902748588333e-6,1.0223303629459592e-6,1.0239750843139463e-6,2.80270216670746e-9,2.382122411280671e-9,3.337252596257391e-9 +Policies/1489,2.1432617311341114e-5,2.1297566512768682e-5,2.162403316324088e-5,5.668131891174314e-7,4.6351907422636367e-7,8.027357212699409e-7 +Policies/8,1.1080144684234675e-6,1.1068864328188802e-6,1.1093976647014448e-6,4.176600755491584e-9,3.5346042745994038e-9,5.438640844745865e-9 +Policies/3,1.0254240209735592e-6,1.0246100702126195e-6,1.0262868704542888e-6,2.719885769439998e-9,2.328118090961715e-9,3.3201597250715058e-9 +Policies/130,2.8524193739094096e-6,2.836417382239156e-6,2.8654443645632686e-6,4.811746341896875e-8,4.1871700908006915e-8,5.897041072213133e-8 +Policies/1667,2.3446851201752135e-5,2.3364466269298987e-5,2.3520569393189087e-5,2.534275014761997e-7,1.9812402745613193e-7,3.589361887741177e-7 +Policies/38338,5.058188722436242e-4,5.041863432670389e-4,5.075191259924301e-4,5.892268424586735e-6,5.2596824103117735e-6,6.389420217702073e-6 +Policies/8,1.106991759004412e-6,1.1060556490251722e-6,1.1078053771738513e-6,2.880277629799766e-9,2.4158685430285807e-9,3.652537096816232e-9 +Policies/51,1.745389888488283e-6,1.743265328450186e-6,1.7470137080399642e-6,6.377414967932239e-9,4.777180755153022e-9,8.898082215296885e-9 +Policies/5855,8.05926543868779e-5,8.041300768125636e-5,8.081201491238379e-5,6.364002298504082e-7,4.7036239817406697e-7,9.685747774708296e-7 +Policies/30,1.3853680902372243e-6,1.3829797697493606e-6,1.388072224274208e-6,8.755893961386329e-9,7.020658724885264e-9,1.1464019191012772e-8 +Policies/517,8.744739972918536e-6,8.713031647272393e-6,8.768287281084936e-6,9.322895672824914e-8,6.730463694955502e-8,1.265375542702819e-7 +Policies/10156,1.3702694841282318e-4,1.3685423521724095e-4,1.3731773202346553e-4,7.636216472324973e-7,4.774131585824437e-7,1.1197953294651993e-6 +Policies/1301,1.8424615306053625e-5,1.8333998866465295e-5,1.856106289869784e-5,3.60608682460478e-7,2.3665210688820257e-7,4.91343059445031e-7 +Policies/21,1.2998626933022808e-6,1.297743428346979e-6,1.3018288495560902e-6,6.891379273101306e-9,5.598605173352755e-9,8.631182054707085e-9 +Policies/4,1.0351310105265677e-6,1.034249472789476e-6,1.03599257387884e-6,3.0252023094142685e-9,2.451797594913096e-9,3.7148322851508817e-9 +Policies/1067,1.6283466478690768e-5,1.6188423120587444e-5,1.637584688483093e-5,3.407791338367671e-7,2.856368475531696e-7,4.1506332323466423e-7 +Policies/40,1.5726379706122732e-6,1.5692830432625817e-6,1.5753976186846519e-6,9.994053797240614e-9,7.888078137813264e-9,1.245433843464349e-8 +Policies/13,1.175575795875334e-6,1.174232082582587e-6,1.1769376597084205e-6,4.837906471074349e-9,4.096482424531246e-9,6.270261350352065e-9 +Policies/4602,6.312475547642835e-5,6.293430999237453e-5,6.33359394651492e-5,6.620828964291776e-7,5.635586018404572e-7,8.35434815450923e-7 +Policies/18431,2.4576681670382297e-4,2.4535316925880865e-4,2.461658222201125e-4,1.2985143408263002e-6,1.015803329035927e-6,1.627805051346513e-6 +Policies/126,2.9336824470331604e-6,2.9222406705798966e-6,2.9437875632890284e-6,3.58916397156697e-8,3.0975587157915565e-8,4.408051929538168e-8 +Policies/463,7.037921978860311e-6,7.00112075543218e-6,7.079172523185469e-6,1.3225270429353408e-7,1.117523825835249e-7,1.59822152655974e-7 +Policies/78,2.0968851457803664e-6,2.094024316217648e-6,2.1001047733777655e-6,1.0065253786841865e-8,7.973626788824323e-9,1.2882982738023835e-8 +Policies/5,1.0514934040559565e-6,1.050861397960141e-6,1.0521056491890115e-6,2.1327244200096204e-9,1.7407852364738108e-9,2.694555994768412e-9 +Policies/6,1.068211770066564e-6,1.066874460971349e-6,1.0694511530790958e-6,4.490706636196266e-9,3.669920883176135e-9,5.82197937973497e-9 +Policies/485,7.958915818524043e-6,7.925016276640371e-6,7.988051141545778e-6,1.0709910235748622e-7,8.861506391187996e-8,1.3256047795725192e-7 +Policies/3,1.030453238844829e-6,1.0298668609628344e-6,1.031003184643135e-6,1.8659981530875048e-9,1.5958691476353515e-9,2.2212611692419496e-9 +Policies/130,2.9096921119478614e-6,2.894175433982674e-6,2.9247515343892105e-6,5.1036546709613766e-8,4.5250991763433e-8,5.921985689434663e-8 +Policies/116,2.680519872687536e-6,2.671289415889928e-6,2.6911400514463534e-6,3.438346958795489e-8,2.973638221232714e-8,4.1577164902578815e-8 +Policies/85,2.2065273397264605e-6,2.2016927489297474e-6,2.2104232732412194e-6,1.471614620303807e-8,1.1455040739200771e-8,2.073801500754812e-8 +Policies/13,1.177354254285839e-6,1.175535874279153e-6,1.1789408128138725e-6,5.5378766826558664e-9,4.725858741987825e-9,6.574223844087525e-9 +Policies/29,1.3889234507403615e-6,1.3860611684217628e-6,1.3910504956780497e-6,8.281201787125686e-9,6.462878212205007e-9,1.1000528540371995e-8 +Policies/2,1.012979937631484e-6,1.0123559306737055e-6,1.0135570666619226e-6,2.0702532838398296e-9,1.7734780061847886e-9,2.5203333552776774e-9 +Policies/1347,1.978804382379837e-5,1.9705087955445877e-5,1.9872639720768226e-5,2.8833490476436337e-7,2.479383670495149e-7,3.552882167828088e-7 +Policies/1779,2.4496745794577747e-5,2.4417793209856976e-5,2.461005070027467e-5,3.161371254973712e-7,2.464783611446978e-7,4.2026092614415876e-7 +Policies/283,4.982591193082396e-6,4.966491132407985e-6,5.003020430242172e-6,6.119950306920596e-8,4.7443299007782614e-8,9.135157588155219e-8 +Policies/62,1.9041498087825415e-6,1.8986839908284673e-6,1.909354109860748e-6,1.7721281547721028e-8,1.4332552895601177e-8,2.194833315302613e-8 +Policies/92,2.309721178881219e-6,2.3052442582028197e-6,2.3136206431335117e-6,1.464715976090944e-8,1.1678703964247765e-8,1.8012763941407245e-8 +Policies/62,1.876203909514874e-6,1.873071084184644e-6,1.8802903950060546e-6,1.2027665333964613e-8,9.725283301046088e-9,1.4957011752098586e-8 +Policies/123,2.7356462931939517e-6,2.7274068065047963e-6,2.7431169661365023e-6,2.7886260709861983e-8,2.359989440095774e-8,3.589497305015314e-8 +Policies/41,1.5807849073013988e-6,1.5792596838940871e-6,1.5821951608746294e-6,4.9758495160984015e-9,4.228530306391961e-9,6.024380100024451e-9 +Policies/213,4.315218956618109e-6,4.310220993753319e-6,4.319921579091133e-6,1.689825503551933e-8,1.460903319224e-8,2.012772394798397e-8 +Policies/524,8.128640803563001e-6,8.105207276915754e-6,8.15445619503027e-6,8.449683948517383e-8,7.116412601017098e-8,1.0366772801103866e-7 +Policies/4396,6.211194371504356e-5,6.177378537023547e-5,6.25288649638554e-5,1.1937442986686189e-6,9.464139820804987e-7,1.6214965382399714e-6 +Policies/1,9.779515606051068e-7,9.768950602828309e-7,9.789439656010035e-7,3.3493771203699452e-9,2.803604513449584e-9,4.063281578509166e-9 +Policies/28,1.3540790246929795e-6,1.3511457177042605e-6,1.3566279131819276e-6,9.287382991181845e-9,7.3714547929663895e-9,1.1649822044935824e-8 +Policies/7,1.0925634516773045e-6,1.0911213798888812e-6,1.0937738457031611e-6,4.347891967012362e-9,3.6542113376992494e-9,5.373115062333246e-9 +Policies/7853,1.0712166130625395e-4,1.0693715845527127e-4,1.0766929647431137e-4,1.0016396294609466e-6,3.613002567784939e-7,1.9930968158055237e-6 +Policies/226,4.17575819083179e-6,4.163374891079644e-6,4.1883771586499935e-6,4.1074796269809776e-8,3.4481133961950684e-8,4.8678432878946965e-8 +Policies/78,2.157211351165798e-6,2.152861911293907e-6,2.163543092043469e-6,1.7746767549725036e-8,1.3931639280637506e-8,2.2692711845176053e-8 +Policies/4,1.0500848544958103e-6,1.0494356630398994e-6,1.050645728810452e-6,1.9845411543611255e-9,1.66303802660144e-9,2.4598149798008996e-9 +Policies/8,1.0926556562406558e-6,1.091954201820151e-6,1.0937252865023094e-6,3.0057001145255034e-9,2.132176952545852e-9,5.236619708156452e-9 +Policies/15459,2.0738549472261485e-4,2.0714663475354027e-4,2.0791745440487753e-4,1.1529359558854176e-6,6.934902725400497e-7,2.1487841387200004e-6 +Policies/40,1.5571561766189758e-6,1.5551307124891003e-6,1.5591913723965405e-6,6.985006700115335e-9,6.180682748654483e-9,8.0737719240718e-9 +Policies/25476,3.479886240567944e-4,3.472962980590489e-4,3.4894958540394806e-4,2.7631856073451385e-6,1.958503719671573e-6,3.82904234293087e-6 +Policies/3711,5.088329307892917e-5,5.0710409492061185e-5,5.1294302986003203e-5,8.960323447754681e-7,4.694082790134855e-7,1.6797207407006164e-6 +Policies/2753,3.831418304343554e-5,3.82068920087677e-5,3.843114974194168e-5,3.91240537613273e-7,3.220290193927313e-7,4.76081373186214e-7 +Policies/37,1.5093029905070775e-6,1.5076729954497554e-6,1.5109330880350582e-6,5.813192839525102e-9,4.905004621864004e-9,7.185598944175122e-9 +Policies/177,3.701076291009131e-6,3.696632479133435e-6,3.7058125969459314e-6,1.5307357087298512e-8,1.2312306749199854e-8,2.0381194435816416e-8 +Policies/10893,1.4783490604605105e-4,1.4733373527120458e-4,1.4841590295782773e-4,1.8900582265565978e-6,1.6613942899096096e-6,2.155827288101139e-6 +Policies/20,1.2725740789495736e-6,1.2716809494896906e-6,1.2733792818264683e-6,2.9493211271741535e-9,2.533191230591055e-9,3.5752297613515846e-9 +Policies/25516,3.378134846347294e-4,3.372322365013679e-4,3.3870258407785083e-4,2.32728609770237e-6,1.5190077928631946e-6,3.2617619021158948e-6 +Policies/6417,8.731326332062393e-5,8.699993728682446e-5,8.781641895159683e-5,1.336325967922191e-6,1.0807872074410822e-6,1.77037928644696e-6 +Policies/10982,1.475800916262827e-4,1.4719098379791187e-4,1.480465798324251e-4,1.5165543409469805e-6,1.2129943048700798e-6,2.098297804512167e-6 +Policies/1000,1.4402437462471718e-5,1.4322632327263703e-5,1.4495056829512344e-5,2.830851851284051e-7,2.4360548030287755e-7,3.385809485441943e-7 +Policies/1000,1.4693695077370464e-5,1.463841406923062e-5,1.4748893881323851e-5,1.8763379073549547e-7,1.6502778601585003e-7,2.1721893756561087e-7 +Policies/1000,1.4415959001829557e-5,1.4368125544814286e-5,1.4471032225864461e-5,1.6662550802891258e-7,1.4193485870607615e-7,2.0064944934840085e-7 +Policies/1000,1.416280115571987e-5,1.4121564467920889e-5,1.4233721287497288e-5,1.8504208535327189e-7,1.257368893740394e-7,3.259372745152614e-7 +Policies/1000,1.4420800623762016e-5,1.4370877069979369e-5,1.4469508041293747e-5,1.6771656155887e-7,1.3385779219309005e-7,2.1389236158564383e-7 +Policies/1000,1.475413961864615e-5,1.471564743895804e-5,1.4814952682619881e-5,1.6412176852939697e-7,1.0944327264488053e-7,2.871737318163761e-7 +Policies/5000,7.189463631358013e-5,7.156936535249899e-5,7.233595900980706e-5,1.2767245053712828e-6,1.0480794322952737e-6,1.6751389887241296e-6 +Policies/5000,6.977548091312812e-5,6.943112384678736e-5,7.019367856507662e-5,1.2159543852228183e-6,9.90682373757167e-7,1.5841499768829372e-6 +Policies/5000,7.12030144189684e-5,7.071833317524066e-5,7.162200396101847e-5,1.484040635252136e-6,1.1899313792295193e-6,1.8877811906884912e-6 +Policies/5000,6.948013194114908e-5,6.91854455461997e-5,6.976571016174288e-5,9.917311481076059e-7,8.296841366362688e-7,1.2065254642363083e-6 diff --git a/plutus-core/cost-model/data/builtinCostModelA.json b/plutus-core/cost-model/data/builtinCostModelA.json index 591f0702900..c5a59edee46 100644 --- a/plutus-core/cost-model/data/builtinCostModelA.json +++ b/plutus-core/cost-model/data/builtinCostModelA.json @@ -1348,5 +1348,21 @@ "arguments": 10, "type": "constant_cost" } + }, + "policies": { + "cpu": { + "arguments": { + "intercept": 930912, + "slope": 13220 + }, + "type": "linear_in_x" + }, + "memory": { + "arguments": { + "intercept": 4, + "slope": 3 + }, + "type": "linear_in_x" + } } } diff --git a/plutus-core/cost-model/data/builtinCostModelB.json b/plutus-core/cost-model/data/builtinCostModelB.json index 29b73e79444..9eeb61bee16 100644 --- a/plutus-core/cost-model/data/builtinCostModelB.json +++ b/plutus-core/cost-model/data/builtinCostModelB.json @@ -1348,5 +1348,21 @@ "arguments": 10, "type": "constant_cost" } + }, + "policies": { + "cpu": { + "arguments": { + "intercept": 930912, + "slope": 13220 + }, + "type": "linear_in_x" + }, + "memory": { + "arguments": { + "intercept": 4, + "slope": 3 + }, + "type": "linear_in_x" + } } } diff --git a/plutus-core/cost-model/data/builtinCostModelC.json b/plutus-core/cost-model/data/builtinCostModelC.json index 80c51fb4a00..66e34d7f2c8 100644 --- a/plutus-core/cost-model/data/builtinCostModelC.json +++ b/plutus-core/cost-model/data/builtinCostModelC.json @@ -1366,5 +1366,21 @@ "arguments": 10, "type": "constant_cost" } + }, + "policies": { + "cpu": { + "arguments": { + "intercept": 930912, + "slope": 13220 + }, + "type": "linear_in_x" + }, + "memory": { + "arguments": { + "intercept": 4, + "slope": 3 + }, + "type": "linear_in_x" + } } } diff --git a/plutus-core/cost-model/data/builtinCostModelD.json b/plutus-core/cost-model/data/builtinCostModelD.json index 73c6a99d164..9978dd0ca0b 100644 --- a/plutus-core/cost-model/data/builtinCostModelD.json +++ b/plutus-core/cost-model/data/builtinCostModelD.json @@ -1348,5 +1348,21 @@ "arguments": 10, "type": "constant_cost" } + }, + "policies": { + "cpu": { + "arguments": { + "intercept": 930912, + "slope": 13220 + }, + "type": "linear_in_x" + }, + "memory": { + "arguments": { + "intercept": 4, + "slope": 3 + }, + "type": "linear_in_x" + } } } diff --git a/plutus-core/cost-model/data/builtinCostModelE.json b/plutus-core/cost-model/data/builtinCostModelE.json index 75b5a420aa3..2a2cbddc5a7 100644 --- a/plutus-core/cost-model/data/builtinCostModelE.json +++ b/plutus-core/cost-model/data/builtinCostModelE.json @@ -1366,5 +1366,21 @@ "arguments": 10, "type": "constant_cost" } + }, + "policies": { + "cpu": { + "arguments": { + "intercept": 930912, + "slope": 13220 + }, + "type": "linear_in_x" + }, + "memory": { + "arguments": { + "intercept": 4, + "slope": 3 + }, + "type": "linear_in_x" + } } } diff --git a/plutus-core/cost-model/data/models.R b/plutus-core/cost-model/data/models.R index 70ac08e6195..d3d18bfae64 100644 --- a/plutus-core/cost-model/data/models.R +++ b/plutus-core/cost-model/data/models.R @@ -161,6 +161,7 @@ arity <- function(name) { "ScaleValue" = 2, "MultiIndexArray" = 2, "AssetCount" = 1, + "Policies" = 1, -1 ## Default for missing values ) } @@ -852,6 +853,8 @@ modelFun <- function(path) { } assetCountModel <- constantModel ("AssetCount") + ## X wrapped with `ValueOuterSize` + policiesModel <- linearInX ("Policies") ## Values @@ -1010,7 +1013,8 @@ modelFun <- function(path) { unionValueModel = unionValueModel, scaleValueModel = scaleValueModel, multiIndexArrayModel = multiIndexArrayModel, - assetCountModel = assetCountModel + assetCountModel = assetCountModel, + policiesModel = policiesModel ) ## The integer division functions have a complex costing behaviour that requires some negative diff --git a/plutus-core/cost-model/test/TestCostModels.hs b/plutus-core/cost-model/test/TestCostModels.hs index 60834cc6d84..5aa26720334 100644 --- a/plutus-core/cost-model/test/TestCostModels.hs +++ b/plutus-core/cost-model/test/TestCostModels.hs @@ -554,6 +554,7 @@ main = , $(genTest 2 "unionValue") Everywhere , $(genTest 2 "valueContains") BelowDiagonal , $(genTest 1 "valueData") + , $(genTest 1 "policies") , -- FIXME: the test for unValueData fails. This may be because of a rounding error in the top coefficient. -- , $(genTest 1 "unValueData") $(genTest 2 "scaleValue") Everywhere diff --git a/plutus-core/plutus-core/src/PlutusCore/Default/Builtins.hs b/plutus-core/plutus-core/src/PlutusCore/Default/Builtins.hs index 05ceb96b3da..8d58f957ec3 100644 --- a/plutus-core/plutus-core/src/PlutusCore/Default/Builtins.hs +++ b/plutus-core/plutus-core/src/PlutusCore/Default/Builtins.hs @@ -32,6 +32,7 @@ import PlutusCore.Evaluation.Machine.ExMemoryUsage , NumBytesCostedAsNumWords (..) , TextCostedByByteLength (..) , ValueMaxDepth (..) + , ValueOuterSize (..) , ValueTotalSize (..) , memoryUsage , singletonRose @@ -2494,12 +2495,12 @@ instance uni ~ DefaultUni => ToBuiltinMeaning uni DefaultFun where multiIndexArrayDenotation (runCostingFunTwoArguments . paramMultiIndexArray) toBuiltinMeaning _semvar Policies = - let policiesDenotation :: Value -> [ByteString] - policiesDenotation = Value.policies + let policiesDenotation :: ValueOuterSize -> [ByteString] + policiesDenotation (ValueOuterSize v) = Value.policies v {-# INLINE policiesDenotation #-} in makeBuiltinMeaning policiesDenotation - (runCostingFunOneArgument . unimplementedCostingFun) + (runCostingFunOneArgument . paramPolicies) toBuiltinMeaning _semvar AssetCount = let assetCountDenotation :: Value -> Integer assetCountDenotation = toInteger . Value.totalSize diff --git a/plutus-core/plutus-core/src/PlutusCore/Default/Universe.hs b/plutus-core/plutus-core/src/PlutusCore/Default/Universe.hs index f2f941110d8..ad284f54a44 100644 --- a/plutus-core/plutus-core/src/PlutusCore/Default/Universe.hs +++ b/plutus-core/plutus-core/src/PlutusCore/Default/Universe.hs @@ -58,6 +58,7 @@ import PlutusCore.Evaluation.Machine.ExMemoryUsage , NumBytesCostedAsNumWords (..) , TextCostedByByteLength (..) , ValueMaxDepth (..) + , ValueOuterSize (..) , ValueTotalSize (..) ) import PlutusCore.Pretty.Extra (juxtRenderContext) @@ -763,6 +764,21 @@ instance readKnown = readKnownCoerce @Value {-# INLINE readKnown #-} +deriving newtype instance + KnownTypeAst tyname DefaultUni ValueOuterSize +instance + KnownBuiltinTypeIn DefaultUni term Value + => MakeKnownIn DefaultUni term ValueOuterSize + where + makeKnown = makeKnownCoerce @Value + {-# INLINE makeKnown #-} +instance + KnownBuiltinTypeIn DefaultUni term Value + => ReadKnownIn DefaultUni term ValueOuterSize + where + readKnown = readKnownCoerce @Value + {-# INLINE readKnown #-} + deriving newtype instance KnownTypeAst tyname DefaultUni ValueMaxDepth instance diff --git a/plutus-core/plutus-core/src/PlutusCore/Evaluation/Machine/BuiltinCostModel.hs b/plutus-core/plutus-core/src/PlutusCore/Evaluation/Machine/BuiltinCostModel.hs index 21ace3ef704..4705cb2c3a5 100644 --- a/plutus-core/plutus-core/src/PlutusCore/Evaluation/Machine/BuiltinCostModel.hs +++ b/plutus-core/plutus-core/src/PlutusCore/Evaluation/Machine/BuiltinCostModel.hs @@ -200,6 +200,7 @@ data BuiltinCostModelBase f , -- Batch 7 paramMultiIndexArray :: f ModelTwoArguments , paramAssetCount :: f ModelOneArgument + , paramPolicies :: f ModelOneArgument } deriving stock (Generic) deriving anyclass (FunctorB, TraversableB, ConstraintsB) diff --git a/plutus-core/plutus-core/src/PlutusCore/Evaluation/Machine/ExBudgetingDefaults.hs b/plutus-core/plutus-core/src/PlutusCore/Evaluation/Machine/ExBudgetingDefaults.hs index cec2c3efc5d..b38a304056b 100644 --- a/plutus-core/plutus-core/src/PlutusCore/Evaluation/Machine/ExBudgetingDefaults.hs +++ b/plutus-core/plutus-core/src/PlutusCore/Evaluation/Machine/ExBudgetingDefaults.hs @@ -430,6 +430,7 @@ unitCostBuiltinCostModel = , -- Batch 7 paramMultiIndexArray = unitCostTwoArguments , paramAssetCount = unitCostOneArgument + , paramPolicies = unitCostOneArgument } unitCekParameters diff --git a/plutus-core/plutus-core/src/PlutusCore/Evaluation/Machine/ExMemoryUsage.hs b/plutus-core/plutus-core/src/PlutusCore/Evaluation/Machine/ExMemoryUsage.hs index 22e14a6fd82..312a55029ac 100644 --- a/plutus-core/plutus-core/src/PlutusCore/Evaluation/Machine/ExMemoryUsage.hs +++ b/plutus-core/plutus-core/src/PlutusCore/Evaluation/Machine/ExMemoryUsage.hs @@ -14,6 +14,7 @@ module PlutusCore.Evaluation.Machine.ExMemoryUsage , IntegerCostedLiterally (..) , TextCostedByByteLength (..) , ValueTotalSize (..) + , ValueOuterSize (..) , ValueMaxDepth (..) , DataNodeCount (..) ) where @@ -422,6 +423,13 @@ instance ExMemoryUsage ValueTotalSize where memoryUsage = singletonRose . fromIntegral . Value.totalSize . unValueTotalSize {-# INLINE memoryUsage #-} +-- | Measure the size of a `Value` by its number of policies (the outer map size). +newtype ValueOuterSize = ValueOuterSize {unValueOuterSize :: Value} + +instance ExMemoryUsage ValueOuterSize where + memoryUsage = singletonRose . fromIntegral . Map.size . Value.unpack . unValueOuterSize + {-# INLINE memoryUsage #-} + {- Note [ValueMaxDepth] This newtype wrapper measures the sum of logarithms of outer and max inner sizes for two-level map structures like Value. diff --git a/plutus-core/plutus-core/test/TypeSynthesis/Golden/Signatures/DefaultFun/Policies.golden.sig b/plutus-core/plutus-core/test/TypeSynthesis/Golden/Signatures/DefaultFun/Policies.golden.sig index 5ba4cb2b87d..f0c74c8db1d 100644 --- a/plutus-core/plutus-core/test/TypeSynthesis/Golden/Signatures/DefaultFun/Policies.golden.sig +++ b/plutus-core/plutus-core/test/TypeSynthesis/Golden/Signatures/DefaultFun/Policies.golden.sig @@ -1 +1 @@ -Value -> [ByteString] \ No newline at end of file +ValueOuterSize -> [ByteString] \ No newline at end of file diff --git a/plutus-ledger-api/src/PlutusLedgerApi/V1/ParamName.hs b/plutus-ledger-api/src/PlutusLedgerApi/V1/ParamName.hs index 5b03ef3d339..09239bbe622 100644 --- a/plutus-ledger-api/src/PlutusLedgerApi/V1/ParamName.hs +++ b/plutus-ledger-api/src/PlutusLedgerApi/V1/ParamName.hs @@ -357,5 +357,9 @@ data ParamName | MultiIndexArray'memory'arguments'slope | AssetCount'cpu'arguments | AssetCount'memory'arguments + | Policies'cpu'arguments'intercept + | Policies'cpu'arguments'slope + | Policies'memory'arguments'intercept + | Policies'memory'arguments'slope deriving stock (Eq, Ord, Enum, Ix, Bounded, Generic) deriving (IsParamName) via (GenericParamName ParamName) diff --git a/plutus-ledger-api/src/PlutusLedgerApi/V2/ParamName.hs b/plutus-ledger-api/src/PlutusLedgerApi/V2/ParamName.hs index 7e300b734e7..41092f16d7d 100644 --- a/plutus-ledger-api/src/PlutusLedgerApi/V2/ParamName.hs +++ b/plutus-ledger-api/src/PlutusLedgerApi/V2/ParamName.hs @@ -359,5 +359,9 @@ data ParamName | MultiIndexArray'memory'arguments'slope | AssetCount'cpu'arguments | AssetCount'memory'arguments + | Policies'cpu'arguments'intercept + | Policies'cpu'arguments'slope + | Policies'memory'arguments'intercept + | Policies'memory'arguments'slope deriving stock (Eq, Ord, Enum, Ix, Bounded, Generic) deriving (IsParamName) via (GenericParamName ParamName) diff --git a/plutus-ledger-api/src/PlutusLedgerApi/V3/ParamName.hs b/plutus-ledger-api/src/PlutusLedgerApi/V3/ParamName.hs index f9f546198ee..399d9b570a4 100644 --- a/plutus-ledger-api/src/PlutusLedgerApi/V3/ParamName.hs +++ b/plutus-ledger-api/src/PlutusLedgerApi/V3/ParamName.hs @@ -375,5 +375,9 @@ data ParamName | MultiIndexArray'memory'arguments'slope | AssetCount'cpu'arguments | AssetCount'memory'arguments + | Policies'cpu'arguments'intercept + | Policies'cpu'arguments'slope + | Policies'memory'arguments'intercept + | Policies'memory'arguments'slope deriving stock (Eq, Ord, Enum, Ix, Bounded, Generic) deriving (IsParamName) via (GenericParamName ParamName) diff --git a/plutus-ledger-api/src/PlutusLedgerApi/V4/ParamName.hs b/plutus-ledger-api/src/PlutusLedgerApi/V4/ParamName.hs index cd4037203ba..5d7a5498118 100644 --- a/plutus-ledger-api/src/PlutusLedgerApi/V4/ParamName.hs +++ b/plutus-ledger-api/src/PlutusLedgerApi/V4/ParamName.hs @@ -370,5 +370,9 @@ data ParamName | MultiIndexArray'memory'arguments'slope | AssetCount'cpu'arguments | AssetCount'memory'arguments + | Policies'cpu'arguments'intercept + | Policies'cpu'arguments'slope + | Policies'memory'arguments'intercept + | Policies'memory'arguments'slope deriving stock (Eq, Ord, Enum, Ix, Bounded, Generic) deriving (IsParamName) via (GenericParamName ParamName) diff --git a/plutus-ledger-api/test/Spec/CostModelParams.hs b/plutus-ledger-api/test/Spec/CostModelParams.hs index 4dd460a9c0d..3993cf191b0 100644 --- a/plutus-ledger-api/test/Spec/CostModelParams.hs +++ b/plutus-ledger-api/test/Spec/CostModelParams.hs @@ -41,10 +41,10 @@ tests = "CostModelParams" "costModelParams" [ embed $ testCase "length" do - 339 @=? length v1_ParamNames - 339 @=? length v2_ParamNames - 357 @=? length v3_ParamNames - 357 @=? length v4_ParamNames + 343 @=? length v1_ParamNames + 343 @=? length v2_ParamNames + 361 @=? length v3_ParamNames + 361 @=? length v4_ParamNames , embed $ testCase "tripping paramname" do for_ v1_ParamNames \p -> assertBool "tripping v1 cm params failed" $ diff --git a/plutus-ledger-api/test/Spec/Data/CostModelParams.hs b/plutus-ledger-api/test/Spec/Data/CostModelParams.hs index 31d67b97a53..77a909fbe4c 100644 --- a/plutus-ledger-api/test/Spec/Data/CostModelParams.hs +++ b/plutus-ledger-api/test/Spec/Data/CostModelParams.hs @@ -41,10 +41,10 @@ tests = "CostModelParams" "costModelParams" [ embed $ testCase "length" do - 339 @=? length v1_ParamNames - 339 @=? length v2_ParamNames - 357 @=? length v3_ParamNames - 357 @=? length v4_ParamNames + 343 @=? length v1_ParamNames + 343 @=? length v2_ParamNames + 361 @=? length v3_ParamNames + 361 @=? length v4_ParamNames , embed $ testCase "tripping paramname" do for_ v1_ParamNames \p -> assertBool "tripping v1 cm params failed" $ From c4556e33e0b08b684be80da46dcb7ef8e42c9694 Mon Sep 17 00:00:00 2001 From: Yuriy Lazaryev Date: Wed, 26 Aug 2026 11:22:49 +0200 Subject: [PATCH 2/2] Register `ValueOuterSize` with the builtin test generators Both generators dispatch on `TypeRep` and call `error` on a type they do not know, so a new size wrapper has to be listed alongside `ValueTotalSize` and `ValueMaxDepth` in each: `genConstant` for the evaluation property tests and `smallConstant` for the cost model safety tests. --- .../budgeting-bench/Benchmarks/Values.hs | 16 +++++++++++----- .../plutus-core/test/CostModelSafety/Spec.hs | 2 ++ .../PlutusCore/Generators/Hedgehog/Builtin.hs | 2 ++ 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/plutus-core/cost-model/budgeting-bench/Benchmarks/Values.hs b/plutus-core/cost-model/budgeting-bench/Benchmarks/Values.hs index 78c788986b4..9c574ba6cc3 100644 --- a/plutus-core/cost-model/budgeting-bench/Benchmarks/Values.hs +++ b/plutus-core/cost-model/budgeting-bench/Benchmarks/Values.hs @@ -398,11 +398,17 @@ assetCountBenchmark gen = {- Note [Benchmarking policies] `policies` is \(O(m)\) in the size of the outer map, which is exactly what `ValueOuterSize` (the measure the denotation uses) reports, so the fit applies to any -shape of `Value`. The number of policies is log-uniform so every decade gets similar -coverage. The token count per policy is random under a total-size cap: the inner maps -are never traversed, so it must not show in the measurements, and the fixed-size -stacks (1000 and 5000 policies at several token counts) would make a violation -visible as vertical spread at a single x. +shape of `Value`. + +The number of policies is sampled uniformly on a log scale, which puts a similar number +of points in 1-10, 10-100, 100-1000 and so on. Sampling uniformly on the count itself +would put almost every point above 1000, leaving the sizes that occur on chain +unmeasured. + +The token count per policy is random under a total-size cap: the inner maps are never +traversed, so it must not show in the measurements, and the fixed-size stacks (1000 and +5000 policies at several token counts) would make a violation visible as vertical spread +at a single x. -} policiesBenchmark :: StdGen -> Benchmark policiesBenchmark gen = diff --git a/plutus-core/plutus-core/test/CostModelSafety/Spec.hs b/plutus-core/plutus-core/test/CostModelSafety/Spec.hs index 47e60023a15..bb13d08ba78 100644 --- a/plutus-core/plutus-core/test/CostModelSafety/Spec.hs +++ b/plutus-core/plutus-core/test/CostModelSafety/Spec.hs @@ -41,6 +41,7 @@ import PlutusCore.Evaluation.Machine.ExMemoryUsage , NumBytesCostedAsNumWords , TextCostedByByteLength , ValueMaxDepth + , ValueOuterSize , ValueTotalSize ) import PlutusCore.Evaluation.Machine.MachineParameters (CostModel (..)) @@ -161,6 +162,7 @@ smallConstant tr | Just HRefl <- eqTypeRep tr (typeRep @Value) = SomeConst Value.empty | Just HRefl <- eqTypeRep tr (typeRep @ValueTotalSize) = SomeConst Value.empty | Just HRefl <- eqTypeRep tr (typeRep @ValueMaxDepth) = SomeConst Value.empty + | Just HRefl <- eqTypeRep tr (typeRep @ValueOuterSize) = SomeConst Value.empty | trPair `App` tr1 `App` tr2 <- tr , Just HRefl <- eqTypeRep trPair (typeRep @(,)) = case (smallConstant tr1, smallConstant tr2) of diff --git a/plutus-core/testlib/PlutusCore/Generators/Hedgehog/Builtin.hs b/plutus-core/testlib/PlutusCore/Generators/Hedgehog/Builtin.hs index 7deaa56a658..25ad81954d7 100644 --- a/plutus-core/testlib/PlutusCore/Generators/Hedgehog/Builtin.hs +++ b/plutus-core/testlib/PlutusCore/Generators/Hedgehog/Builtin.hs @@ -25,6 +25,7 @@ import PlutusCore.Evaluation.Machine.ExMemoryUsage , NumBytesCostedAsNumWords , TextCostedByByteLength , ValueMaxDepth + , ValueOuterSize , ValueTotalSize ) import PlutusCore.Generators.Hedgehog.AST hiding @@ -130,6 +131,7 @@ genConstant tr | Just HRefl <- eqTypeRep tr (typeRep @Value) = genArbitraryBuiltin @Value | Just HRefl <- eqTypeRep tr (typeRep @ValueTotalSize) = genArbitraryBuiltin @Value | Just HRefl <- eqTypeRep tr (typeRep @ValueMaxDepth) = genArbitraryBuiltin @Value + | Just HRefl <- eqTypeRep tr (typeRep @ValueOuterSize) = genArbitraryBuiltin @Value | trPair `App` tr1 `App` tr2 <- tr , Just HRefl <- eqTypeRep trPair (typeRep @(,)) = -- We can perhaps use the @QuickCheck@ generator here too, but this seems rather hard.