BBPE icon indicating copy to clipboard operation
BBPE copied to clipboard

使用多线程能起到加速效果吗?

Open KenyonY opened this issue 1 year ago • 1 comments

https://github.com/OctopusMind/BBPE/blob/357382279e0f66b0e67acdd700898087f372f1db/bbpe.py#L124

如题,这里使用python多线程的作用是?

KenyonY avatar Apr 29 '24 05:04 KenyonY

提高程序的性能和效率,但效果一般。由于Python的全局解释锁(Global Interpreter Lock,GIL)而无法实现真正的并行。 如果想加速,建议使用多进程来代替多线程。

algorithmexplorer avatar May 07 '24 02:05 algorithmexplorer