c++ - 这段FFT程序用递归为什么多线程反而慢于单线程
黄舟
黄舟 2017-04-17 13:53:56
0
2
580
黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(2)
PHPzhong

The effect of multi-threading becomes more obvious when the workload is larger. When the volume is small, the time consumption caused by thread creation and switching will be greater than the time saved by parallel computing. Just like 1,000 people building a house is not necessarily faster than 10 people building a house, but 1,000 people building 100 houses will be faster than 10 people.

阿神

I suggest you print the time before and after the code block or function that you think is suspicious, so that you can see where the time is spent.
Then analyze why it takes time.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!