When I was reading the vue source code today, I encountered a writing method that I didn't understand.
view source
const deduped = [...new Set(pendingPostFlushCbs)]
In my opinion, it is a shallow copy of the array. But why should I convert to Set first,can I have better performance? How should I understand it?