Python code performance decreases with threading

后端 未结 2 796
有刺的猬
有刺的猬 2020-11-30 05:04

I\'ve written a working program in Python that basically parses a batch of binary files, extracting data into a data structure. Each file takes around a second to parse, whi

2条回答
  •  心在旅途
    2020-11-30 05:34

    The threading library does not actually utilize multiple cores simultaneously for computation. You should use the multiprocessing library instead for computational threading.

提交回复
热议问题