Closed PudgeKim closed 1 year ago
Hey!
Tight
and Mixed
are an optimization.
To get a Tight
iterator the components needs to be all next to each others in memory and the total length of the iterator needs to be known. Mixed
can represent all iterators but is slower.
For modified
we kind of have all next to each others in memory because it's a single storage but the number of modified components is unknown.
The known/unknown length is important for Producer
/UnindexedProducer
.
Hello!
I want to run
some_components.modified()
in parallel.I tried writing the code like
let ParIter::Tight(par_iter) = components.modified().par_iter() else { unreachable!() };
But it went to theunreachable
.When I tried the code below
let ParIter::Mixed(par_iter) = components.modified().par_iter() else { unreachable!() };
It worked.