Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
Rotten194
· 9y ago · 0 comments
isn't that hideously inefficient? you're making a new object each iteration.
Comments
[–]
Touche
9y ago
But purity.
[–]
djfm
9y ago
it's very unlikely this is going to be the bottleneck in your application
[–]
mintplant
9y ago
I wouldn't be so quick to write that off as a performance concern. Creating tons of unnecessary objects is JavaScript's equivalent to programming without regard for cache locality at a lower level, due to the way the JITs work.
[–]
Touche
9y ago
It's very unlikely you'll get any benefit from doing it the inefficient way either. Does eslint not support "ignore this part" comments?
[–]
Prefinem
9y ago
Yes it does
// eslint-disable-line your-rule-to-ignore