Home » » cython function in ipython

cython function in ipython

cython function in ipython

%load_ext cythonmagic

In [4]: %%cython
   ...: def fib(int n):
   ...:         cdef int a,b,i
   ...:         a,b=1,1
   ...:         for i in range(n):
   ...:                 a, b = a+b, a
   ...:         return a
   ...:

Just a simple rewrite, the cython function is 100X faster than the python one. 

5 Comments:

sri said...

Thanks for sharing this informative content.,
Leanpitch provides online training in Scrum Master Certification , everyone can use it wisely.
Join Leanpitch 2 Days CSM Certification Workshop in different cities.

Scrum master certification online

CSM certification online

sri said...

Thanks for sharing this informative content.,
Leanpitch provides online training in Scrum Master Certification, everyone can use it wisely.
Join Leanpitch 2 Days CSM Certification Workshop in different cities.


CSM online

CSM online certification

sri said...

Thanks for sharing this informative content.,
Leanpitch provides online training in Scrum Master Certification, everyone can use it wisely.
Join Leanpitch 2 Days CSM Certification Workshop in different cities.

CSM online training

CSM training online

sri said...


Thanks for sharing this informative content.,
Leanpitch provides online training in Scrum Master Certification, everyone can use it wisely.
Join Leanpitch 2 Days CSM Certification Workshop in different cities.
CSM training online

Scrum master training online

sri said...


Thanks for sharing this.,
Leanpitch provides online training in Scrum Master, everyone can use it wisely.
Join Leanpitch 2 Days CSM Certification Workshop in different cities.

Scrum master certification

csm certification

Popular Posts