The optimizations of string equality are somewhat fragile. Particularly, the optimization of deciding when we don't need the full generality of memequal and can do something better instead.
The ordering of equality can make a difference, when it really shouldn't. Some orderings generate a memequal call, and some don't.
Compares that are obviously constant-sized, like those against the empty string, can sometimes still generate memequal calls.
Noticed as part of the truthy benchmarks, mentioned here.
The optimizations of string equality are somewhat fragile. Particularly, the optimization of deciding when we don't need the full generality of
memequaland can do something better instead.The ordering of equality can make a difference, when it really shouldn't. Some orderings generate a
memequalcall, and some don't.Compares that are obviously constant-sized, like those against the empty string, can sometimes still generate
memequalcalls.Noticed as part of the truthy benchmarks, mentioned here.