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

ParallelSliceFitter #51

Open
forcar opened this issue Jan 27, 2019 · 0 comments
Open

ParallelSliceFitter #51

forcar opened this issue Jan 27, 2019 · 0 comments

Comments

@forcar
Copy link
Contributor

forcar commented Jan 27, 2019

Three suggestions:

  1. Replace ArrayList with synchronized list (avoiding thread collisions):
    // ArrayList fitResults = new ArrayList();
    List fitResults = Collections.synchronizedList(new ArrayList());

  2. Remove progress code with Thread.sleep which was evidently intended to minimize thread collisions. This speeds up ParallelSliceFitter by at least x10.

  3. fitResults are filled from slice threads and therefore not in ascending bin sequence. Resort:
    fitResults.sort(Comparator.comparing(FitResults::getPoint));

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

No branches or pull requests

1 participant