Benefits of cooperative multitasking

If you have a carefully well-designed GCD code, I wouldn't expect migrating to Swift Concurrency increase performance just by this fact. The major benefits of migration I see is

  1. Cleaner code.
  2. Static compiler checks.

This can unveil some issues you might be not aware of and make it simpler to reason about the code. This can end-up with some performance gains, especially if during migration you review design aspects of the solution, maybe got some blocking code to go away, etc. – but, at least to my knowledge, there is no guarantee that you actually will have determined performance impact.

Yeah, that's the question of what we compare to what. I just understood initial question in terms of Swift Concurrency vs (largely) GCD. Yet on a larger scale there are also questions to consider – like the one discussed in this thread a while ago.

3 Likes