Skip to content

Commit 994e699

Browse files
committed
refactor: refine cost model parameters for Value builtins
Updated cost parameters based on fresh benchmark data analysis: - lookupCoin: Adjusted intercept (284421→179661) and slope (1→7151) to better reflect actual performance with varying currency counts - valueContains: Changed from added_sizes to linear_in_y model with refined parameters (intercept 42125119→1000, slope 30→130383) - valueData: Reduced constant cost (205465→153844) based on updated profiling results - unValueData: Switched to linear_in_x model with refined parameters (intercept 10532326261→1000, slope 431→33094) All three cost model variants (A, B, C) updated for consistency.
1 parent 7b12263 commit 994e699

File tree

3 files changed

+2536
-2536
lines changed

3 files changed

+2536
-2536
lines changed

plutus-core/cost-model/data/builtinCostModelA.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,8 +1209,8 @@
12091209
"lookupCoin": {
12101210
"cpu": {
12111211
"arguments": {
1212-
"intercept": 284421,
1213-
"slope": 1
1212+
"intercept": 179661,
1213+
"slope": 7151
12141214
},
12151215
"type": "linear_in_z"
12161216
},
@@ -1222,10 +1222,10 @@
12221222
"valueContains": {
12231223
"cpu": {
12241224
"arguments": {
1225-
"intercept": 42125119,
1226-
"slope": 30
1225+
"intercept": 1000,
1226+
"slope": 130383
12271227
},
1228-
"type": "added_sizes"
1228+
"type": "linear_in_y"
12291229
},
12301230
"memory": {
12311231
"arguments": 1,
@@ -1234,7 +1234,7 @@
12341234
},
12351235
"valueData": {
12361236
"cpu": {
1237-
"arguments": 205465,
1237+
"arguments": 153844,
12381238
"type": "constant_cost"
12391239
},
12401240
"memory": {
@@ -1245,8 +1245,8 @@
12451245
"unValueData": {
12461246
"cpu": {
12471247
"arguments": {
1248-
"intercept": 10532326261,
1249-
"slope": 431
1248+
"intercept": 1000,
1249+
"slope": 33094
12501250
},
12511251
"type": "linear_in_x"
12521252
},

0 commit comments

Comments
 (0)