Currently TypeInfo.tsize() and TypeInfo.talign() are virtual functions that simply return an integral each. Then there's the work on const-folding those: https://github.com/dlang/dmd/pull/11792
The right and simpler approach is to make these two member variables in the TypeInfo object. That should make everything easier, cheaper, and faster, including the const folding.
Comment #1 by robert.schadek — 2024-12-13T19:11:44Z