Skip to content

Instantly share code, notes, and snippets.

View PaulSorensen's full-sized avatar

Paul Sørensen PaulSorensen

View GitHub Profile
@lovasoa
lovasoa / README.md
Last active January 21, 2021 19:56
Compute the intersection of large arrays in javascript

WARNING : This code now lives in its own github repository: lovasoa/fast_array_intersect. It is also published on npm: fast_array_intersect

Array intersect

Fastest function to intersect a large number of big arrays in javascript, without dependencies

  • The compressed version is only 345 caracters long.
  • Faster than common libraries, even a large number of arrays, or on very big arrays. (See benchmarks)