Most of the examples I have seen in the Cython documentation have a cdef header 
and many also have cdefs for typing.  

Although optional, here is a quote from 
"https://www.quora.com/How-fast-is-Cython"; which indicates that typing will 
make a big difference in Cython performance:  "Just simply converting to Cython 
is rarely much of a win.  Some tight loops with little type checking might get 
a boost of tens of percents, but don't bet on it.  Declaring the variables as 
cdefs around a loop can be a big change."  

Even in cases where cdef is optional, there are still manual compilation steps. 
 You're probably familiar with that already, but here is from one part of the 
docs:

"Now following the steps for the Hello World example we first rename the file 
to have a .pyx extension, lets say fib.pyx, then we create the setup.py file. 
Using the file created for the Hello World example, all that you need to change 
is the name of the Cython filename, and the resulting module name . . . ".  

The next step is to "build the extension with the same command used for the 
helloworld.pyx:  $ python setup.py build_ext --inplace"

PysoniQ does not require these manual steps, and does not need typings or cdef 
headers to get optimium speed.  

Thanks,

Mark
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/Q5B42U7MN7D6BG3EECQ3BDCWEKXZF553/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to