This dumb implementation is actually the fastest way to remove duplicates from a JS array https://gist.github.com/bendc/da83fdac68a1095f3595 …
@bdc An even faster way would be to add all items to a `Set` and then pull them all out again.
-
-
@mathias Unless I’m doing it wrong (http://sharedfil.es/AoWAkcVTsy.txt ), using `Set` seems to be way slower. -
@bdc You don’t need `if (set.has(el)) continue` – the `Set` does that for you. - 3 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.