I have 2 large arrays populated with strings both containing > 150.000 elements
const allNew = allArrayOneValues.filter(val => !allArrayTwoValues.includes(val));
I need to compare the two arrays like this to find out which elements are not in ArrayTwo yet or to find out which elements to delete from ArrayTwo as they are no longer in ArrayOne.
Filtering here takes around 3 to 5 minutes... is there a way to do a far more efficient compared to find out which values in ArrayOne are not yet in ArrayTwo OR which values are in ArrayTwo which are not in ArrayOne...
Thanks Thomas
Setor an object?