dcoombs: while you're already trained for slow execution, why don't you feed your program to valgrind? it's the tool that saved the day when I was still programming in C/C++... :-) And given what it actually does, it's not _that_ slow.
Job still working on a nice project based on CDSware. It's a good document management platform which is now mainly in Python but with some remaining parts in PHP. The team has a really interesting sensibility regarding high level languages (not only python, but also in the functional family), which helps in thinking in terms of "the right tool for the job", and not in terms of "the hype of the day". They managed to get very good performance in searching almost 1M documents, with complex queries running in less that 1s, by using boolean vectors from Numerical python, serialized in a MySQL database.