Want this course?
When you need to modify an immutable value, you actually make a modified copy. If you make a lot of changes, you make a copy for each change. If you're just going to throw those copies away, that is a major waste. Transients let you create a local mutable copy of a collection, modify it, and then freeze it. When used with large-batch modifications, it can significantly improve performance.