Improve memory allocations in TOSFilter
The following discussion from !621 (merged) should be addressed:
-
@graven started a discussion: (+2 comments) This would benefit from the arena allocator in LHCb!2197 (merged), as the maximum size of the set is known up front... (note; one does have to figure out the overhead of an
std::set
, as the # of bytes it needs is not just sum oftrack->lhcbIDs().size()
timessizeof(LHCbID)
, but some multiple of that).Alternatively, one could utilize the fact that the LHCbID inside a track are sorted, and implement a variation of
std::inplace_merge
, merging the tracks into the 'current' output list...