This is my fun.pyx file
cimport cython
@cython.boundscheck(False)
cdef long long int extr():
cdef long long int i=0;
while i<=20000000000:
i=i+1
return i
def fn():
return extr()
This is my test.py file
from fun import fn
import time
t1=time.time()
print(fn())
print(time.time()-t1)
But after running this,I found only 3% increase in speed as compared with python program.How to optimize this program? Any suggestions would be helpfull. Thanks in advance.