[solved] Iterating a normal iterator with rayon


I have a normal (sequential) iterator and I want to map each item and collect the resulting items. Would it be better to use a for-loop in a rayon::scope, or to collect the items into a temporary Vec and then use rayon’s parallel iterator API on that Vec? I’m pretty sure the former option would be better, but the rayon docs recommend not using the scope API for some reason.


nevermind, found the solution.