This dumb implementation is actually the fastest way to remove duplicates from a JS array https://gist.github.com/bendc/da83fdac68a1095f3595 …
@bdc You don’t need `if (set.has(el)) continue` – the `Set` does that for you.
-
-
@mathias@bdc Made me curious, JSPerf: http://jsperf.com/dumb-remove-duplicates-from-array … -
@pieterbeulque@mathias That doesn’t work on Safari though. - 1 more reply
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.