Regular expression as dictionary key?
Martin von Loewis
loewis at informatik.hu-berlin.de
Mon Dec 3 11:59:36 CET 2001
Luke <LLoeffler at home.com> writes:
> So you add a few lines to go exhaustively through the keys and
> accumulate matches... Still linear. I admitedly don't know much about
> the C implementation of dicts, but it seems there should be a way to
> leverage the dict's arrangement for fast regex keys.
You mean, you can inspect every element of a set in sub-linear time? I
guess you can solve P==NP as well :-)
More information about the Python-list