Avoid unnecessary object allocations.