Skip to content

GeneratorObjects: Avoid atomic operations on shared_ptr.

Atomic operations on shared_ptr turn out to be surprisingly expensive. Rework HepMcParticleLink to use CachedValue rather than holding an atomic shared_ptr. We can avoid having HepMcParticleLink increase in size by declaring the CachedValue as no_unique_address. Then m_evtColl can occupy the trailing padding of the CachedValue.

Merge request reports

Loading