I hate the code duplication as much as you do. But I think a diff (b diff a) would require creating an entire set (b diff a) and throwing it away afterwards, so I would be surprised if it was not significantly slower in some cases.

I think a good long term plan to get rid of duplication is to refactor the HashTrie into a separate structure and wrap it in two different ways, kind of how it is done with RedBlackTree. That would remove a ton of duplication.