Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement chunks_exact and chunks_exact_mut #629

Merged
merged 3 commits into from
Mar 12, 2020
Merged

Conversation

zesterer
Copy link
Contributor

Follow-up PR from #510. chunks_exact (and its mutable counterpart) are not yet implemented on ParallelIterator, only ParallelSlice.

src/slice/mod.rs Outdated Show resolved Hide resolved
@seijikun
Copy link

seijikun commented Aug 1, 2019

Hey guys, is there any news on this?
I'm currently depending on @zesterer's branch with my crate (kmeans), because its already delivering a speedup by a factor of ~4x in its current form for me (as compared to par_bridge()).

I tried having a look at the produced asm code, but couldn't figure out if the chunk-size-check was still in there.

@cuviper
Copy link
Member

cuviper commented Aug 1, 2019

@seijikun I'm not surprised that it would perform better than par_bridge, but have you compared to the inexact par_chunks / par_chunks_mut?

@seijikun
Copy link

seijikun commented Aug 1, 2019

@cuviper Ah, totally forgot about that. I wasn't able to use it when I decided to use this branch (because of the remainder). Refactored the code to manually pad the data (so that there is no other-sized remainder).
I now barely see a difference between par_chunks() and par_chunks_exact().

@cuviper
Copy link
Member

cuviper commented Aug 1, 2019

That's a good point -- the remainder API has value regardless of size-check optimizations.

@Coder-256
Copy link

Is this still being worked on?

@cuviper cuviper changed the title WIP: Implement chunks_exact and chunks_exact_mut Implement chunks_exact and chunks_exact_mut Mar 12, 2020
@cuviper
Copy link
Member

cuviper commented Mar 12, 2020

I think this is ready now -- thanks for the PR, @zesterer!

bors r+

@bors bors bot merged commit 3096967 into rayon-rs:master Mar 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants