4 ms·
How is this feature implemented, what is the complexity of access via index? Is it O(1)? Also, adding interfaces onto struct and referencing them by interface c
by polskibus 9y ago
How is this feature implemented, what is the complexity of access via index? Is it O(1)? Also, adding interfaces onto struct and referencing them by interface causes boxing, right? If so, performance benefit of valuetuple is erased.
- zamalek 9y agoIt is implemented with a recursive call (if the tuple contains tuples), otherwise, it's a hardcoded constant. > boxing You can create a generic function that accepts T where T: ITuple to eliminate this cost.