Skip to content

Var is in rework and be renamed variant. Tup will become tuple and sorted_tuple will be added #18

@Remi123

Description

@Remi123

Tup and Var were initially created as a simple "example" to demonstrate how to do it, but then I realized that it may be good to implement them correctly.
So to make it easier and show off a little, I'm in the process of reworking both tup and var to tuple and variant. If I'm feeling good with my implementation I'll do an optional.

Tup is in the process of being reworked. I'm not happy with the compile-time performance since it sort the types by size to make it as small as possible with alignment. However, instantiating a tup of 100 of types tooks more than 300s on my computer. Simply unacceptable as a general tool. I removed the sorting and got 6s for a tuple of 500 int which is great (51s for std::tuple)
So tup will be renamed tuple and be similar to std::tuple, but with better performance at compile time. However, I'll add te::sorted_tuple to bring this feature to people interested by small size of class.

Var is more complex. People are preoccupied by the std::visit performance, which is due to a limitation of the language in my opinion. Anyway, I think I have a design that can improve the visitation.

Metadata

Metadata

Assignees

Labels

reworkFeatures are currently in a rework state

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions