I was working with Cython, while I was watching out for methods to optimize Python code. Cython is something that takes my attention the most; instead of printing C-code for yourself, you can choose to have other data types in your python code itself.
Here is a test I attempted,
#!/usr/bin/python
# test.pyx
def test(value):
for i in xrange(value):
i**2
if(i==1000000):
print i
test(10000001)
$ time python test.pyx
real 0m16.774s
user 0m16.745s
sys 0m0.024s
$ time cython test.pyx
real 0m0.513s
user 0m0.196s
sys 0m0.052s