by username90 · 7y ago · 0 comments
Remember this: Compiler optimizations are very unreliable, small innocuous changes in code can get huge effects on performance.
Edit: Just looked at the code in the link, and Array.from is not the only difference, the other code uses string concatenation instead of array concatenation. Appending to a string in Javascript is typically a lot faster than appending to an array.
The same is true in C# if I recall correctly. Not sure if that’s still the case