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

Mel mwilson at the-wire.com
Sat Jul 4 14:20:09 EDT 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.

	Mel.





More information about the Python-list mailing list