ParseSourceCodeStudy
ParseSourceCodeStudy copied to clipboard
为什么dispatch_async放在for循环效率会变那么高
因为for循环中所需要执行的任务都dispatch到后台执行了,所以每次循环都是立刻返回。
这里还可以用dispatch_apply来代替,更加明了一些。@ChenYilong
@jasonhotsauce 做 dispatch_async这个操作不会很耗时咯?
做 dispatch_async这个操作不会很耗时咯?
这个要相对的来看,一般来说是不太影响performance的,但是如果滥用的话,也会有问题。