Performance and memory optimization.