Skip to content

AthContainersInterfaces+AthContainers: Streamline AuxElement.

Rework to reduce the overhead of AuxElement.

AuxElement contains a container index, and container pointer, a private data pointer. IAuxElement also has a dummy member, m_dummy, needed to work around some ROOT limitations. On a 64-bit platform, this then totals 4 64-bit words.

However, there are really only three possible states for the private data pointer: nullptr, the same a m_container, or a special value to flag that the element used to have private data. It turns out to be simpler to just replace this with an enum that can have one of three states.

ROOT still seems to have problems if IAuxElement is empty. However, rather than using a dummy member, we can instead put the index and private data members there.

This reduces the AuxElement overhead from 4 to 3 64-bit words.

It would be `easy' to reduce this further; for example by using fewer than 64 bits for the index. However, this is observed to spoil optimizations that we'll want later on, so this is not done.

(This should also help moving forward if we want to be able to create temporary AuxElement objects as proxies).

Merge request reports