Skip to content

Commit

Permalink
Merge branch 'i908' of github.com:ScorexFoundation/sigmastate-interpr…
Browse files Browse the repository at this point in the history
…eter into i908
  • Loading branch information
kushti committed Jan 9, 2025
2 parents 18a6a77 + 2c501a7 commit 45a4686
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,10 @@ class CErgoTreeEvaluator(
operations.forall { case (key, value) =>
var res = true
// the cost of tree update is O(bv.treeHeight)
addSeqCost(UpdateAvlTree_Info, nItems) { () =>
// Here (and in the previous methods) the cost is not properly approximated.
// When the tree is small (or empty), but there are many `operations`, the treeHeight will grow on every iteration.
// So should the cost on every iteration.
addSeqCost(UpdateAvlTree_Info, nItems) { () =>
val updateRes = bv.performInsertOrUpdate(key.toArray, value.toArray)
res = updateRes.isSuccess
}
Expand Down

0 comments on commit 45a4686

Please sign in to comment.