question: calling .toSet() on a mutableSet like `s...
# announcements
f
question: calling .toSet() on a mutableSet like
someMutableSet.toSet()
seems to be a very time consuming operation? I am doing some naive bayes model on the 20newsgroup data and
return someMutableSet.toSet()
will making prediction on test data takes more than 10 minutes while
return someMutableSet
will finish in 10 seconds…?🤔 And there is no updates on this returned set downstreams, only using it to get size or get some intersect… It’s a bit counterintuitive 🤨