-
• #2
This works
var A="1234567890"; var B = A; console.log(B.length,process.memory()); B+=A; console.log(B.length,process.memory()); B+=A; console.log(B.length,process.memory());
Looks like a problem with iterating through a string that is changed during iteration.
-
• #3
Interesting - thanks! I'll make an issue for this.
There was a post a few weeks ago where someone asked whether
+=
was optimised to append. This looks like a side-effect of that optimisation. -
• #4
Actually just fixed this - it was an easy tweak
-
• #5
Thanks Gordon, glad it was not a major rewrite.
Produces: