Optimize string expression concatenation
Now that we have function return type inference (CLJS-1997), we can see that functions like namespace return strings. Additionally, we can easily make it so that expressions involving str are inferred as returning strings. With those two in place, with a mild extension to CLJS-2314, we can eliminate unnecessary string coercions in str macro expansions where arguments are inferred to be strings.
This leads to performance gains which are akin to checked-if elimination (but perhaps even greater):
Yields these speedups under :advanced
This could be great for UIs that are heavy in string-concatenation, as well as for the self-hosted compiler.
CLJS-2865-5.patch rebaselines while also accommodating the changes in that are currently on master.
This revision of the patch passes CI, Canary, and shows no slowdown when compiling the Coal Mine corpus.
CLJS-2865-4.patch no longer applies
Patch no longer applies.