If you would like to improve the running performance of Python, try
1) Use profile/cProfile to benchmark your program, find the possible hotspot, switch to correct data structure to solve problem etc.
2) If after step 1), the performance doesn't still meet the requirement, then
a) Consider PyPy/Pyrex
b) Rewrite the hotspot logic by using C++