|
|
|
|
|
by g_airborne
2080 days ago
|
|
It's not that Python is by definition much slower than C++, rather, doing inference in C++ makes it much easier to control exactly when memory is initialised, copied and moved between CPU and GPU. Especially on frame-by-frame models like object detection this can make a big difference. Also, the GIL can be a real problem if you are trying to scale inference on multiple incoming video streams for example. |
|
The GIL and slowness of Python become a problem when processing multiple streams or doing further time consuming calculations in Python.