Skip to content

Commit bc65088

Browse files
committed
See what the cost model looks like if we use the default size measure
1 parent fd68983 commit bc65088

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

plutus-core/plutus-core/src/PlutusCore/Evaluation/Machine/ExMemoryUsage.hs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,9 +260,7 @@ memoryUsageBytes :: Integer -> CostingInteger
260260
-- integerLog2# is unspecified for 0 (but in practice returns -1)
261261
-- ^ This changed with GHC 9.2: it now returns 0. It's probably safest if we
262262
-- keep this special case for the time being though.
263-
memoryUsageBytes 0 = 1
264-
memoryUsageBytes i = fromIntegral $ I# (integerLog2# (abs i) `quotInt#` integerToInt 8)+ 1
265-
-- memoryUsageBits i = fromIntegral $ I# (integerLog2# (abs i) `quotInt#` integerToInt 64) + 1
263+
memoryUsageBytes = memoryUsageInteger
266264
-- So that the produced GHC Core doesn't explode in size, we don't win anything by inlining this
267265
-- function anyway.
268266
{-# OPAQUE memoryUsageBytes #-}

0 commit comments

Comments
 (0)