I’m not sure. In this thread there is a benchmark: [ANN] LightSumTypes.jl v4 - #15 by Tortar
which suggests that on 1.11 the different is small or even against sum types. But I’m not following closely these developments.
(personally I would prefer to use the package, to guarantee that it is fast on 1.10 which is the current LTS)