String and StringBuilder Performance (part 1)
We explain why string concatenation in a loop causes exponential slowdown: strings are immutable reference types with value-type copy semantics, so every modification clones the entire string on the heap. The lesson covers the memory consequences, garbage collector pressure, and real-world scenarios where this matters.
Previous Module
A Crash Course In Intermediate Language
This Module
Basic Performance Optimizations