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

Use Rayon for data parallelism! #3

Merged
merged 1 commit into from
Jun 4, 2019
Merged

Use Rayon for data parallelism! #3

merged 1 commit into from
Jun 4, 2019

Conversation

mominul
Copy link
Member

@mominul mominul commented Jun 4, 2019

Here we use rayon for parallelism of dictionary searching of phonetic suggestion code. I have done the benchmarks and got 1.20x speedups!

name           old ns/iter  new ns/iter  diff ns/iter   diff %  speedup 
bench_a        456,249      361,669           -94,580  -20.73%   x 1.26 
bench_aro      537,914      461,900           -76,014  -14.13%   x 1.16 
bench_bistari  716,478      598,755          -117,723  -16.43%   x 1.20

For getting better support of rayon, we use the hashbrown's HashMap. But I am not using it in other places because it'll be the default HashMap implementation of the Rust standard library. So we'll get them free in next Rust versions.

@mominul
Copy link
Member Author

mominul commented Jun 4, 2019

cc @Adyel

@mominul mominul merged commit 023079a into master Jun 4, 2019
@mominul mominul deleted the parallelism branch June 4, 2019 10:37
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.

1 participant