Avoid appending every char, instead keep track of the start and end of unescaped text and append it all at once.  This reduces the cost of the SourceMap escapeString functionality by ~25%.
Avoid appending every char, instead keep track of the start and end of unescaped text and append it all at once.  This reduces the cost of the SourceMap escapeString functionality by ~25%.

PiperOrigin-RevId: 416349432

ChadKillingsworth/closure-compiler,ChadKillingsworth/closure-compiler,monetate/closure-compiler,monetate/closure-compiler,ChadKillingsworth/closure-compiler,google/closure-compiler,nawawi/closure-compiler,nawawi/closure-compiler,google/closure-compiler,nawawi/closure-compiler,monetate/closure-compiler,google/closure-compiler,monetate/closure-compiler,nawawi/closure-compiler,ChadKillingsworth/closure-compiler,google/closure-compiler