Josiah Carlson wrote:

> Assuming that dictionaries and the hash algorithm for strings is not
> hopelessly broken, I believe that one discovers quite quickly when two
> strings are not equal.

You're probably right, since if there's a hash collision,
the colliding strings probably differ in the first char
or two.

Interning will speed up the case where they are equal,
where otherwise you would have to examine every character.

Still, there could be extension modules out there
somewhere that make use of PyString_CHECK_INTERNED,
so there's a slight chance that home-grown interning
might not give the same results in all cases.

--
Greg
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to