top | item 11352256 (no title) x1024 | 10 years ago Case in point: the left-pad package has quadratic complexity. discuss order hn newest mcguire|10 years ago Depends on the JS implementation in question. And I think node uses one that optimizes string concatenation, possibly making that the fastest way to do it. emodendroket|10 years ago Yeah, as far as I know in modern JS engines += is actually faster than using an array. x1024|10 years ago [citation needed]It's really nice how we once again depend on "I think some guys do it like this" for performance. What happened to standards?What's next? SEO for code?
mcguire|10 years ago Depends on the JS implementation in question. And I think node uses one that optimizes string concatenation, possibly making that the fastest way to do it. emodendroket|10 years ago Yeah, as far as I know in modern JS engines += is actually faster than using an array. x1024|10 years ago [citation needed]It's really nice how we once again depend on "I think some guys do it like this" for performance. What happened to standards?What's next? SEO for code?
emodendroket|10 years ago Yeah, as far as I know in modern JS engines += is actually faster than using an array.
x1024|10 years ago [citation needed]It's really nice how we once again depend on "I think some guys do it like this" for performance. What happened to standards?What's next? SEO for code?
mcguire|10 years ago
emodendroket|10 years ago
x1024|10 years ago
It's really nice how we once again depend on "I think some guys do it like this" for performance. What happened to standards?
What's next? SEO for code?