Thank! I am just trying and it runs pretty fast. The articles.article_id is unique so I did not use Set at first, but I couldn’t figure out why using set could make it so much faster
There is a tradeoff. If you are doing one in then not converting vector to Set is faster. If you are doing many lookups then it is better to do the conversion.
Because it cannot be known upfront what your use case is you need to be explicit and create Set if you expect to perform many lookups.