JavaScript Set vs. Array performance