Interestingly, a trivial production program, <a href="http://pastebin.com/m6eb5ac73" rel="nofollow">http://pastebin.com/m6eb5ac73</a> became several times as slow with it. A simple affair that removes entries in file A that are in file B, by reading contents of B into a set then iterating over A, applied to file A being $(seq 1 7000000) and file B being $(seq 500 150000).<p>I guess that shows how well tuned Python's sets/dicts are -- gprof suggested most time was spent in Shedskin's sets, looking up keys/comparing keys; even using -O3 did not help.<p>I currently use Pyrex (Cython is a newer version of it), successfully to write 5% of the code in its Pythony C. It's rare in my case that I can find a spot which can be easily rewritten in C; it may be 5% of the code that's time-intensive but it's 5% using all sorts of complex data structures created by the other 95%.