Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I have updated the time-ordering so that it doesn't fill a ROOT tree in the first instance, but a vector of the MiniballDataPackets class. These data are then time-ordered using the std::sort algorithm, which is super fast because it is done completely in memory. I tested the memory pressure and it is smaller than the histogrammer. We basically open the 2 GB MIDAS file in memory, then have all of that again in the vector, so we have something like 4 GB maximum memory usage. It did end up using something like 9 GB in the end, but there is no leak at least.
To write the output tree then, we loop over the sorted vector and fill the tree. Seems to work, but code needs some cleaning up. People are free to take a look at it for now though, might speed things up online.
I did a test with a run file from the IS708 run last year, results below for a subrun with 6525 x 64kB blocks of data.
ROOT standard sorting:
New super sorter:
That is a factor of 2.5 times faster for small files, no
-ebisflag included.A larger 2 GB file with 32000 x 64 kB blocks of data gives:
ROOT standard sorting:
New super sorter:
which is a factor of 2.9 times faster. So consistently better :-)