# Jobs and Tasks

**URL:** <https://forums.swift.org/t/jobs-and-tasks/53957>\
**Category:** Using Swift\
**Tags:** concurrency\
**Created:** [December 9, 2021, 2:06pm UTC](https://forums.swift.org/t/jobs-and-tasks/53957 "2021-12-09T14:06:30Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![David\_Smith](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/david_smith/32/37508_2.png) [@David\_Smith](https://forums.swift.org/u/David_Smith)\
**Post date:** [December 9, 2021, 6:59pm UTC](https://forums.swift.org/t/jobs-and-tasks/53957/4 "2021-12-09T18:59:07Z")

</div>

> [@Douglas\_Gregor](#):
>
> When there is no actor hop, yes, and this can be Really Important for performance, because you can have synchronous fast-paths like this in async functions that don't need to involve the concurrency system at all and can (e.g.) be inlined and optimized away by the compiler.

If anyone is interested in seeing an extreme example of this, search for `AsyncUnicodeScalarSequence` [here](https://github.com/apple/swift-corelibs-foundation/pull/3036/files), and take a look at its `next()` implementation. After inlining this ends up compiling down to just a handful of arithmetic and branch instructions, with no calls or async overhead. `_AsyncBytesBuffer` does the same trick, but is a little more tangly to read.

---

_[View the full topic](https://forums.swift.org/t/jobs-and-tasks/53957)._
