Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. COThanks, @SteveB. But can you elaborate a bit on what you mean by "_For a one-file project like yours_..."? The module above is one (albeit important) part of a larger application. How does `pyximport` affect my code's speed? And finally, the section here: ["_Since Cython 0.11, the pyximport module also has experimental compilation support for normal Python modules_..."](http://docs.cython.org/src/userguide/tutorial.html#pyximport-cython-compilation-the-easy-way) implies that it still has some kinks to work out. Can you explain that as well?
      singulars
    2. CORe "experimental compilation support for normal Python modules" -- with the code I suggested above, `.py` modules are compiled normally (not with cython) while `.pyx` modules are compiled with cython. If you pass `pyimport = True` into `pyximport.install()`, then it will use cython for everything, even for example `import random` or `import os`. I don't suggest using that feature, simply because there's no compelling reason to use it, and it could create problems. It's probably used mainly by cython developers.
      singulars
    3. COIf `pyximport` works at all, it will create the exact same C code as any other method. So try it and see. I was referring to the fact that when the compilation process is sufficiently complicated, e.g. links to external system libraries, you might find that pyximport fails and you need a `setup.py` and `cythonize` to specify exactly how to build it. But the fact that your `.pyx` module has `import`s or `cimport`s does not mean that it can't be compiled with `pyximport`; it may well be totally fine.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload