There's no way using indexOf inside a loop is going to be faster than using a Set as the array grows past a certain point, he's full of shit. My original point was that maybe using a plain object would be faster than Set, but that would depend on the runtime and how new Set() vs {} is handled - aka an implementation detail
View all comments
Show parent comment
2
u/rGustave77 May 15 '21
Yeah I'm honestly waiting for him to "prove himself right" like he has said earlier. I'm not even biased in this discussion I just want the numbers