MemoryUsage

scalus.uplc.eval.MemoryUsage
See theMemoryUsage companion trait
object MemoryUsage

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def integerLog2(i: BigInt): Long

Counts the number of nodes in a Data value (each Constr/Map/List/I/B node is 1, ignoring the size of integer/bytestring leaves). Matches Plutus DataNodeCount, used to cost unValueData.

Counts the number of nodes in a Data value (each Constr/Map/List/I/B node is 1, ignoring the size of integer/bytestring leaves). Matches Plutus DataNodeCount, used to cost unValueData.

Attributes

Memory usage as literal value (for IntegerCostedLiterally).

Memory usage as literal value (for IntegerCostedLiterally).

Returns the absolute value of i, saturating to Long.MaxValue for values that don't fit. This matches Plutus behavior where fromIntegral narrows to maxBound::SatInt.

Attributes