4 ms·
> except that the tags are not going to be optimized by the compiler These strings should all be === at least if they are compiled together (the JITter could e
by thelazydogsback 7y ago
> except that the tags are not going to be optimized by the compiler
These strings should all be === at least if they are compiled together (the JITter could even intern them to make sure), I believe -- so it will typically be a single 64-bit ptr compare whether it's a string or int. Only in the case where you're constructing the DU tag at runtime for some reason would you need to compare the strings.