Avoid memory allocation when possible.