If you want to make your program faster, you first have to measure why it is slow. This means finding out where the program is spending its time. Use one of the available profilers for that. As you can see from the linked examples, it is not that difficult.
If you know where the program spends most of its time, you can decide wether optimization is worthwhile or even possible. If your program is e.g. already saturating your network connection, tinkering with the program won't make it faster.
If you add the slowest code from your program to your question, maybe we can help you improve it. Usually the big gains can be made by improving on the algorithms that you use. For instance if your code does the same calculations on a long list of data, it is generally easy to make it faster with e.g. multiprocessing.Pool. If you have a N-core CPU, Pool.map()
can be up to N times faster than a regular map()
.
If that isn't sufficient, a lot of standard python code can be run on the pypy implementation, which generally faster than the cpython implementation.
Apart from the already mentioned cython, you could also use an existing extension written in C like e.g. numpy for numerical computations. Another option of course is to write a purpose-built extension in C.
Your operating system also matters. It seems python on XP is slower on file access than e.g. on Linux.