Y
Hacker News
new
|
ask
|
show
|
jobs
by
Rotten194
3263 days ago
isn't that hideously inefficient? you're making a new object each iteration.
2 comments
Touche
3263 days ago
But purity.
link
djfm
3263 days ago
it's very unlikely this is going to be the bottleneck in your application
link
mintplant
3263 days 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.
link
Touche
3263 days 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?
link
Prefinem
3263 days ago
Yes it does
// eslint-disable-line your-rule-to-ignore
link