Waldek Hebisch wrote:
Unless someone volunteers to implement the hard one. (I won't stop them, but I won't write it myself.)
Jan Hubicka pointed out that membership testing is more expensive with SSE2, which means that hard way may in fact be slower. So I am too for easy way.
Though for set constructors, GPC optimizes membership tests and does not use sets internally at all (e.g. `x in [a .. b, c]' is turned to `((x >= a) and (x <= b)) or (x = c)' (taking care of side-effects in x). But this doesn't cover all uses of sets, and if it's not clear that it's a gain, it's probably not worth it.
Frank