Use Bevy's parallel iterators rather than rayon #423
Labels
A-Integration
very bevy specific
C-Enhancement
New feature or request
D-Difficult
Needs strong technical background, domain knowledge, or impacts are high, needs testing...
P-Low
S-not-started
Work has not started
Rapier uses Rayon's parallel iterators to parallelize the engine (through the macros
par_iter!
andpar_iter_mut!
, which either calls.iter()
or.par_iter()
(or the mutable equivalents).But Bevy also has parallel iterators:
Query
has.par_iter()
and.par_iter_mut()
and it uses Bevy's own runtime to parallelize the queries.Are there plans to make use of this?
A potential issue is that
QueryParIter
oddly doesn't implementIterator
. In this example one sees that it's expected to writeRather than
Which I don't know why exactly; but other than that, it seems in principle possible to have a pluggable backend for parallel iteration.
(I opened this issue here because I think it only makes sense to expose this on
bevy_rapier
but maybe it should be moved to the main Rapier repository)The text was updated successfully, but these errors were encountered: