Code that ought to run fast, but can't due to Python limitations.

Mel mwilson at
Sat Jul 4 20:20:09 CEST 2009

John Nagle wrote:
[ ... ]
> Parsers have many named compile-time constants.  Python doesn't support
> named compile-time constants, and this is one of the places where we
> have to pay the bill for that limitation.
> Something to think about when you need three more racks of servers
> because the HTML parser is slow.

One technique used in such a case is to dispatch different case-handling 
functions via a dictionary lookup.


More information about the Python-list mailing list