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

Wavelet transform (e.g. retouch) speedup #5205

Merged
merged 5 commits into from
Aug 13, 2020

Conversation

ralfbrown
Copy link
Collaborator

The discrete wavelet transform code was running essentially single-threaded, and what multithreading that did happen was basically burning CPU cycles for no gain.

This PR speeds up single-threaded performance by about 10% on SSE-capable systems, and multithreaded performance by more than a factor of two with eight or more threads. (Test was retouch module with 6 wavelet scales and a "pencil" brush on one of the scales.)

Four 'for' loops were parallelized, but each of them runs so fast
single-threaded that the threading overhead greatly exceeds any gains
(resulting in massive use of CPU time for essentially no speed
improvement).  This patch limits threads to 2 to avoid wasting CPU
time.
@TurboGit TurboGit self-requested a review May 28, 2020 08:07
@TurboGit TurboGit added the scope: performance doing everything the same but faster label May 28, 2020
@TurboGit TurboGit added this to the 3.4 milestone May 28, 2020
@github-actions
Copy link

This pull request did not get any activity in the past 30 days and will be closed in 365 days if no update occurs. Please verify it has no conflicts with the master branch and rebase if needed. Mention it now if you need help or give permission to other people to finish your work.

Copy link
Member

@TurboGit TurboGit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good, thanks.

@TurboGit TurboGit merged commit 9b390ff into darktable-org:master Aug 13, 2020
@ralfbrown ralfbrown deleted the dwt_speedup branch August 17, 2020 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-pr-activity scope: performance doing everything the same but faster
Development

Successfully merging this pull request may close these issues.

None yet

2 participants