Closed schillic closed 16 hours ago
The removed loop used a shortcut for set types that are never empty, but the compiler figures that out and also skips isempty.
that sounds quite advanced. how does it figure that out?
The removed loop used a shortcut for set types that are never empty, but the compiler figures that out and also skips isempty.
that sounds quite advanced. how does it figure that out?
Simply because isempty(X) = false
is constant, and then the if isempty(X)
can be optimized away.
The function
_issubset_in_emptyset
callsisempty
. The removed loop used a shortcut for set types that are never empty, but the compiler figures that out and also skipsisempty
. So this was not really faster. Hence, I suggest to remove the loop to keep the codebase smaller.