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

optimize parallel methods #619

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

ashWhiteHat
Copy link
Contributor

Abstract

I optimized parallelize method.
This is depending on #595.

I did experiment about pallalelize here.
I changed parallelize method according to following result.

Summary

Words

Word Explanation
Turning Degree The minimum degree k that the parallel starts to get benefit.
Task Size The task that per thread processes.
Task Point The point that expresses concrete task size as the addition is 1 and the multiplication is 5~6.
Base Turning Point The turning degree when we perform 1 task point and degree is 13.
Chunk Size The task point that per thread processes.

Fact

  • The thread number is almost nothing to do with turning degree.
    Benched with thread number 2 and 8.
  • The bigger task size, the lower turning degree.
  • The bigger task size, the more the parallel speeds up.
  • The bigger task size, degree and thread number, the smaller chunk size is efficient.
  • The task size is 5 times addition < 1 time multiplication < 6 times addition.
  • The influence rate is Task Point > Degree > Thread Number.

Variables

The turning degree can be computed approximately (Base Turning Degree) - (log(Task Point)).
The chunk size can be computed approximately n / 2^{[8 * (log(Task Point)) + 2 *(k - (Base Turning Degree)) + log(thread_number)] / 8}.

I would appreciate it if you could confirm.
Thank you.

@ashWhiteHat ashWhiteHat force-pushed the feat/optimize-parallel-methods branch from e70df57 to b131df0 Compare July 1, 2022 07:07
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