Tiled algorithm implementations #22
Merged
+2,669
−264
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.
This is a big merge, which adds three implementations of the N2Tiled algorithm. These use different data layout strategies and have rather different performance.
The first uses an SoA layout connected to the tiles themselves, so that each tile's jets are stored in a compact structure. However, this requires many containers to be allocated (
Vector{Float64}
for each tracked parameter) across many tiles, which is really expensive in typical scenarios where there are O(500) tiled being tracked. This is theN2TiledSoATile
strategy. It is the slowest of the 3 implementations.The second uses a global SoA, for a compact jet representation. This is much faster for the global operations such as finding the minimum value for
dij
. However, keeping the compact global SoA requires shuffling and shrinking containers as jets are merged and finalised, which is quite a lot of data movement. This is theN2TiledSoAGlobal
strategy. It is more than x2 faster than the SoA per tile, but still suffers from complex book keeping and data shuffling.The third algorithm is a port of Philippe Gras' FastJet inspired implementation of the
N2Tiled
algorithm from that package. It keeps book keeping very light, but maintains a compact list ofdij
parameters to allow for fast searching for the jet merges and finalisations. This turns out to be optimal.This PR is to snapshot the work done so far. It will then be the starting point for a production release of this package.