|
|
|
|
|
by ReflectedImage
806 days ago
|
|
Going through the official Python tutorial is a must: https://docs.python.org/3/tutorial/ Use multiprocessing not multithreading due to the GIL. Python optimization is generally at a higher level, you use a better algorithm to get a result faster, rather than you saved an unnecessary copy. Know when to use Python async. Python is slow but you can always move work over into the database or dedicated library like NumPy. Use the faster Python interpreter PyPy, which does JIT. Do a multiprocessing pipeline with your CPU bound work broken down into stages. |
|