There is a difference between doing hardcore data crunching in Python and tweaking performance slightly. If you are doing lots of networking and are not using twisted or stackless then you are an idiot. Psyco can sometimes lead to a significant speedup just by adding a couple of lines of code; this speedup may indicate the need for further tweaking of your data structures or codebase, but sometimes it just works faster using psyco. If you have a couple of hotspots that need speeding up then Pyrex and Cython are good tools to drop down into C for a particular function and they are both very good tools (along with the ctypes modules that is now included in the standard library) for writing interfaces to existing C libraries. Using the "real" C/Python API should be a last resort if you have no other option, but not the first tool you reach for...
Comments
There is a difference between doing hardcore data crunching in Python and tweaking performance slightly. If you are doing lots of networking and are not using twisted or stackless then you are an idiot. Psyco can sometimes lead to a significant speedup just by adding a couple of lines of code; this speedup may indicate the need for further tweaking of your data structures or codebase, but sometimes it just works faster using psyco. If you have a couple of hotspots that need speeding up then Pyrex and Cython are good tools to drop down into C for a particular function and they are both very good tools (along with the ctypes modules that is now included in the standard library) for writing interfaces to existing C libraries. Using the "real" C/Python API should be a last resort if you have no other option, but not the first tool you reach for...