Maric Michaud wrote: > The problem here, is that the strings in the set are compared by value, which > is not optimal, and I guess python compare them by adress ("s*n is s*n" has > the same complexity than "s*n == s*n" in CPython, right ?).
wrong. > timeit -s"s='x'; n=1000" "s*n is n*s" 1000000 loops, best of 3: 1.9 usec per loop > timeit -s"s='x'; n=1000" "s*n == n*s" 100000 loops, best of 3: 4.5 usec per loop </F> -- http://mail.python.org/mailman/listinfo/python-list