How to add numbers using multiple threads?

前端 未结 0 841
长情又很酷
长情又很酷 2021-01-28 13:03

I\'m trying to add the numbers in a range eg. 1 to 50000000. But using a for-loop or reduce(_:_:) is taking too long to calculate the result.

         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题