8000 Add a threadpool and run the comparison of each file with all files after it in a different thread by cgkantidis · Pull Request #71 · dlidstrom/Duplo · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add a threadpool and run the comparison of each file with all files after it in a different thread #71

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

Closed
wants to merge 1 commit into from

Conversation

cgkantidis
Copy link
Contributor

Duplo's job is embarrassingly parallel and thus the usage of a threadpool is the easiest way to speed up Duplo's runtime.

This is a classic case of trading larger memory consumption for faster runtime.

Even the most basic laptops nowadays have at least 8GB of RAM, and not using all of the available memory is a waste.

For enterprise machines, which can have 100s of GB of RAM is trade-off of memory for runtime reduction is especially appreciated.

Users can elect to run the tool with a single thread (-j 1) in order to revert to the old behavior, with no extra cost in memory.

The only synchronization between the threads is the logging messages by the exporter, which are printed by each thread when it finishes comparing a file with all other files after it.

Quake 2 runtime and memory scaling:
quake2

GCC 15.1.0 runtime and memory scaling:
gcc-15 1 0

…fter it in a different thread

Duplo's job is [embarrassingly parallel](https://en.wikipedia.org/wiki/Embarrassingly_parallel)
and thus the usage of a threadpool is the easiest way to speed up Duplo's
runtime.

This is a classic case of trading larger memory consumption for faster runtime.

Even the most basic laptops nowadays have at least 8GB of RAM, and not using all
of the available memory is a waste.

For enterprise machines, which can have 100s of GB of RAM is trade-off of memory
for runtime reduction is especially appreciated.

Users can elect to run the tool with a single thread (-j 1) in order to revert
to the old behavior, with no extra cost in memory.

The only synchronization between the threads is the logging messages by the
exporter, which are printed by each thread when it finishes comparing a file
with all other files after it.
@cgkantidis
Copy link
Contributor Author

Closing for a small fix regarding the tests.
I will re-open the PR shortly.

@cgkantidis cgkantidis closed this May 17, 2025
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
0