Explain the contain property and its impact on performance.

The contain property improves performance by isolating rendering to specified elements, reducing layout calculations.