Figure 2.1 shows relative the relative performance of
creating a string and populating it with the contents "Hello World".
This type of test is where the simple structure and tight compiler
integration of a stack-based char*
become an advantage, allowing for excellent
performance. There is also a noticeable improvement in using a stack
Str
over a heap-based one. The standard string
class has
the lowest performance in this test, a trend that continues throughout
the benchmark.