Here's the crux of the optimization: During the parse phase, two arrays are built:

The template array contains the non-dynamic parts of the template:
```javascript
['Hello ', '!']
```

The keys array contains all of the property keys the template uses:
```javascript
['name']
```

Now, all the compile step has to do to get the full string is join the template array to the keys array (while looking up the actual value for the key.)