On Thursday, 26 February 2026 at 18:39:40 UTC, user1234 wrote:
I see.. I thought to my reply yesterday and saw how unperfect it was. What I mean is really like when you have to deal with a lot of let'say base "Object"s then a tag can be faster than a dynamic cast. Problem is we cant really merge struct members...so even with the tag there's might be indirections, compared to using a tag for class casts. I hope this is clearer now.
in short. tag access is O1, dyncast is not constant time. Problem might be that then you have to restrict access to fields of whatever depends on the tag _each time_.
