News for hackers. Stuff that matters.
Re:Problems with TypeScript by thelazydogsback on Tuesday January 21, 2020 @10:15AM (#22107602)
> 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.

There are no comments on this comment yet.