In all honesty, I have a strong dislike for language converters. These usually are tailored to give intermediate performance instead of the normal python extra slow performance, or have some other gimmick that lets you do something differently. I don't know if under the hood the "cython" converts to C or C++ as an intermediate step or if it just bypasses the weirdint type in favor of CPU int types and similar basic fixes? There are a number of one-off python stepchildren like cython and scipy or whatever the "scientific" one is called. This runs standard Python code without any changes, but often is many times faster than the "official" Python interpreter (CPython). Last but not least, if performance is your primary concern here, then have a look at the PyPy project: This could be better than re-writing the whole program in C/C++. This way you can write certain performance-critical functions of your program in C/C++ code, while the main "business logic" of your program can remain in normal Python code. You can also write a Python extension module in C/C++ and then call it from your "normal" Python code: py files into a single "fully self-contained" package (e.g. translate it to C/C++ and then compile it), but instead it simply bundles the Python interpreter together with all the required. PyInstaller as well as py2exe can create a single EXE file from your Python program:īut this does not really convert your Python code to "native" code (e.g.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |