Using C / C ++ for heavy computing in Python (also MySQL)

I embed the algorithm in my Python web application and include the execution of (possibly) large clustering and matrix calculations. I saw that Python can use the C / C ++ libraries, and thought it would be nice to use this to speed up the process.

First: Are there any reasons or something else that I should keep in mind?

Secondly: I have some reluctance to associate C with MySQL (where I get data by calculations). Is this justified in any way?

+4
source share
3 answers

Use the ecosystem.

numpy scipy , , Matlab. , C FORTRAN, C- Python . numexpr, numpy/scipy.

Python, . , , numpy/scipy. , , , Python, , . , theres Cython, Python .

, , , C/++. , / - .

+1

, , KISS:

  • .
  • .

, " , ".

+1

cython ++ , . cython. 500 .

, cython ++. ++ , . - .

++/cython , . ++, python/cython. ( array.array numpy.array). , ++, cython, . , , python ++: RAII/gc.

, python ++. , new delete .. ++, , .

, , . python ++.

, python , ++. ++ .

python cython ++, . , ++. python / .

+1

Source: https://habr.com/ru/post/1539417/


All Articles