Interesting work on packing tuple layout

user1234 user1234 at 12.de
Sat Jun 13 19:35:14 UTC 2020


On Saturday, 13 June 2020 at 19:11:33 UTC, Andrei Alexandrescu 
wrote:
> https://github.com/ZigaSajovic/optimizing-the-memory-layout-of-std-tuple
>
> Would be interesting to adapt it for std.tuple.

Look possible. At first glance, staticSort on the template 
variadic argument based on a predicate template that looks at 
alignment of element maybe.

   struct Tuple(A...)
   {
       staticsort!(pred, A) members;
   }

although with the possibility to name each member this will be in 
practice more complicated


More information about the Digitalmars-d-announce mailing list