As many of comments suggesting the time you have mentioned with cython is just time taken in converting .py file into .c file. That .c file will be big interms of memory. The advantage is that you can compile that .c file using C compiler also
I will give you one example :
if you have a python file we need to store as .pyx file. By running "cython xyz.pyx" it will create .c and .so files
Lets check in picture files created by cython command
The size also increases in my case it changed for Bytes to Kb
There is some specific method to compile the python code
you can refer this links:
http://cython.readthedocs.io/en/latest/src/reference/compilation.html
https://rajeshrinet.github.io/blog/2014/cython/
another thing i noticed is no where they mention the memory problems in cython
When i try to implement in my embedded project.I am facing lot of memory problems.
You can try pypy Where there is no need to put extra efforts to compile and the time also reduced in terms of compilation time
Refer the picture:
compare time between python and pypy
Thank you..