Skip to content

Commit b12c894

Browse files
authored
Update unionValue complexity (#7382)
1 parent 99122c4 commit b12c894

File tree

1 file changed

+2
-4
lines changed
  • plutus-core/plutus-core/src/PlutusCore

1 file changed

+2
-4
lines changed

plutus-core/plutus-core/src/PlutusCore/Value.hs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -294,10 +294,8 @@ valueContains v1 v2
294294
goInner t a2 = (<>) (All $ lookupCoin (unK c) (unK t) v1 >= a2)
295295
{-# INLINEABLE valueContains #-}
296296

297-
{-| The precise complexity is complicated, but an upper bound
298-
is \(O(n_{1} \log n_{2}) + O(m)\), where \(n_{1}\) is the total size of the smaller
299-
value, \(n_{2}\) is the total size of the bigger value, and \(m\) is the
300-
combined size of the outer maps.
297+
{-| \(O(n_{1}) + O(n_{2})\), where \(n_{1}\) and \(n_{2}\) are the total sizes
298+
(i.e., sum of inner map sizes) of the two maps.
301299
-}
302300
unionValue :: Value -> Value -> Value
303301
unionValue (unpack -> vA) (unpack -> vB) =

0 commit comments

Comments
 (0)