|
|
|
|
|
by rubber_duck
3291 days ago
|
|
>comparable to some compiled languages Given that python programs usually run an order of magnitude slower than compiled languages even a 2x performance increase doesn't put it in the "comparable" range from my experience. Not bashing python - I use it regularly - but for computational stuff it's a hog unless you're just passing stuff to C libs - like I have a resource build pipeline that does some blender 3D model transformations - code is written in python and takes forever - equivalent code in C++ would take roughly 1/100 of the time and performance would be irrelevant but atm. we're seriously considering rewriting parts in C++ to reduce build times. |
|
Use numpy for matrices. If you have to implement an algo with a hot inner loop, use cython or numba.
I've never seen 100x difference in Python-C++ rewrite if Python was optimized already.
Here is a good article about some of the options: https://rare-technologies.com/word2vec-in-python-part-two-op...