Memory Measurement & Optimization
ByteCount — number of bytes used to store an expression
LeafCount — number of "leaves" in an expression
Clear — clear main values of a symbol
ClearAll — clear all values and attributes
$HistoryLength — number of previous outputs to store
MemoryConstrained — abort a computation if it uses too much memory
MemoryInUse — amount of memory currently in use
MaxMemoryUsed — maximum memory used in this
Mathematica kernel
Share — internally share common subexpressions
FileByteCount — size of an external file
Compress — generate a compressed string representation of any expression
Uncompress — recover an expression from its compressed string representation
Short — display a shortened version of an expression