# \#performance

**URL:** https://forums.swift.org/tag/performance/37.md

[Latest](https://forums.swift.org/latest.md) · [Categories](https://forums.swift.org/categories.md) · [Tags](https://forums.swift.org/tags.md)

---

## [\[Pitch\] Observation performance and modeling improvements](https://forums.swift.org/t/pitch-observation-performance-and-modeling-improvements/89924)

<div class="topic-metadata">

**Author:** [@Philippe\_Hausler](https://forums.swift.org/u/Philippe_Hausler)\
**Replies:** 16\
**Last updated:** [October 22, 2026, 2:53pm UTC](https://forums.swift.org/t/pitch-observation-performance-and-modeling-improvements/89924 "2026-10-22T14:53:47Z")

</div>

Observation is now the model layer of most new SwiftUI code, and it is increasingly used outside SwiftUI: in middleware, in synchronization between models, and on constrained targets. That breadth exposes costs and gap…

---

## [Very fast fuzzy string matching in Swift for interactive searches](https://forums.swift.org/t/very-fast-fuzzy-string-matching-in-swift-for-interactive-searches/84707)

<div class="topic-metadata">

**Author:** [@hassila](https://forums.swift.org/u/hassila)\
**Replies:** 15\
**Last updated:** [October 22, 2026, 7:36am UTC](https://forums.swift.org/t/very-fast-fuzzy-string-matching-in-swift-for-interactive-searches/84707 "2026-10-22T07:36:25Z")

</div>

At Ordo One, we needed a fast fuzzy string matcher in Swift for interactive search over 250K–1M financial instruments. Swifts case-insensitive substring matching was too slow and too rigid for a real interactive UX. We l…

---

## [I made Swift 6 prove the race was gone. ARC still used atomic retain/release](https://forums.swift.org/t/i-made-swift-6-prove-the-race-was-gone-arc-still-used-atomic-retain-release/89912)

<div class="topic-metadata">

**Author:** [@salari\_dev](https://forums.swift.org/u/salari_dev)\
**Replies:** 2\
**Last updated:** [October 6, 2026, 2:19pm UTC](https://forums.swift.org/t/i-made-swift-6-prove-the-race-was-gone-arc-still-used-atomic-retain-release/89912 "2026-10-06T14:19:25Z")

</div>

I ran a small compiler experiment around a question that is easy to conflate: If Swift 6 actor isolation rejects a race at the language level, does that also change ARC atomicity underneath? I compared the generated ou…

---

## [AttributedContainer.init Performance Issues](https://forums.swift.org/t/attributedcontainer-init-performance-issues/89706)

<div class="topic-metadata">

**Author:** [@k.benua](https://forums.swift.org/u/k.benua)\
**Replies:** 2\
**Last updated:** [September 23, 2026, 9:11pm UTC](https://forums.swift.org/t/attributedcontainer-init-performance-issues/89706 "2026-09-23T21:11:58Z")

</div>

Current state of AttributedContainer.init Performance My team and I have faced unexpected degradation when performed migration to UIButton.Configuration with a AttributedString. At first, I've logged the duration locally…

---

## [SourceKit-LSP CPU spinning and libdispatch complications](https://forums.swift.org/t/sourcekit-lsp-cpu-spinning-and-libdispatch-complications/82472)

<div class="topic-metadata">

**Author:** [@roman-bcny](https://forums.swift.org/u/roman-bcny)\
**Replies:** 24\
**Last updated:** [September 17, 2026, 7:36pm UTC](https://forums.swift.org/t/sourcekit-lsp-cpu-spinning-and-libdispatch-complications/82472 "2026-09-17T19:36:25Z")

</div>

Hi there! I have been looking into the Windows CPU spinning issue SourceKit-LSP use of CPU · Issue #1461 · swiftlang/sourcekit-lsp · GitHub (caused by the underlying DispatchIO.read spinning while pipe is open on Windows…

---

## [Why does it take so long to build and test SwiftPM on the CI?](https://forums.swift.org/t/why-does-it-take-so-long-to-build-and-test-swiftpm-on-the-ci/86898)

<div class="topic-metadata">

**Author:** [@Finagolfin](https://forums.swift.org/u/Finagolfin)\
**Replies:** 6\
**Last updated:** [August 10, 2026, 6:07pm UTC](https://forums.swift.org/t/why-does-it-take-so-long-to-build-and-test-swiftpm-on-the-ci/86898 "2026-08-10T18:07:26Z")

</div>

This has been bothering me lately, as it now takes the same amount of time to build, test, and install SwiftPM as to build, test, and install the Swift compiler itself, just over an hour on linux. Here are the latest num…

---

## [Swift-span-algorithms — allocation-free algorithms over Span / RawSpan](https://forums.swift.org/t/swift-span-algorithms-allocation-free-algorithms-over-span-rawspan/88542)

<div class="topic-metadata">

**Author:** [@Dave861](https://forums.swift.org/u/Dave861)\
**Replies:** 0\
**Last updated:** [July 26, 2026, 5:37am UTC](https://forums.swift.org/t/swift-span-algorithms-allocation-free-algorithms-over-span-rawspan/88542 "2026-07-26T05:37:16Z")

</div>

Repo: Dave861/swift-span-algorithms SPI Releases: swiftpackageindex.com/Dave861/swift-span-algorithms Zero dependencies, Apache-2.0, macOS 13 deployment floor for the Span/RawSpan surface, 181 tests. Why Span is ~Esca…

---

## [Quick look at Ref and MutableRef in Swift 6.4 (WWDC26)](https://forums.swift.org/t/quick-look-at-ref-and-mutableref-in-swift-6-4-wwdc26/87397)

<div class="topic-metadata">

**Author:** [@Okariuss](https://forums.swift.org/u/Okariuss)\
**Replies:** 0\
**Last updated:** [June 15, 2026, 6:11pm UTC](https://forums.swift.org/t/quick-look-at-ref-and-mutableref-in-swift-6-4-wwdc26/87397 "2026-06-15T18:11:21Z")

</div>

Hi everyone, Following the updates from WWDC26, I researched the new Ref and MutableRef types in Swift 6.4. These tools allow us to work with stack values safely without heap allocations. I wrote a short technical post…

---

## [Exploring borrow and mutate in Swift 6.4: Hands-on Project & Performance Insights](https://forums.swift.org/t/exploring-borrow-and-mutate-in-swift-6-4-hands-on-project-performance-insights/87353)

<div class="topic-metadata">

**Author:** [@Okariuss](https://forums.swift.org/u/Okariuss)\
**Replies:** 2\
**Last updated:** [June 13, 2026, 6:04pm UTC](https://forums.swift.org/t/exploring-borrow-and-mutate-in-swift-6-4-hands-on-project-performance-insights/87353 "2026-06-13T18:04:52Z")

</div>

Hi everyone, After watching the WWDC26 sessions and diving into the recent ownership proposals, I wanted to test these concepts in practice using the Swift 6.4 Beta. I built a hands-on project to experiment with borrow…

---

## [Unexpected ObjC bridging symbols emitted for pure-Swift final classes in Array/Set](https://forums.swift.org/t/unexpected-objc-bridging-symbols-emitted-for-pure-swift-final-classes-in-array-set/86693)

<div class="topic-metadata">

**Author:** [@sew](https://forums.swift.org/u/sew)\
**Replies:** 12\
**Last updated:** [May 30, 2026, 12:33pm UTC](https://forums.swift.org/t/unexpected-objc-bridging-symbols-emitted-for-pure-swift-final-classes-in-array-set/86693 "2026-05-30T12:33:07Z")

</div>

Hello everyone, In a large iOS codebase, I recently investigated a binary size regression caused by replacing an immutable struct backed by private reference storage with an equivalent immutable final class. I was able …

---

## [Developing intuition for when values will be copied](https://forums.swift.org/t/developing-intuition-for-when-values-will-be-copied/86421)

<div class="topic-metadata">

**Author:** [@snej](https://forums.swift.org/u/snej)\
**Replies:** 4\
**Last updated:** [May 1, 2026, 10:44pm UTC](https://forums.swift.org/t/developing-intuition-for-when-values-will-be-copied/86421 "2026-05-01T22:44:21Z")

</div>

TL;DR: I'm looking for rules of thumb about the circumstances when optimized Swift code will copy a (nontrivial) struct/enum value. Coming from C++ as I do, I'm used to thinking about the overhead of passing parameters …

---

## [FixedPointDecimal — exact decimal arithmetic, 50x–1000x faster than Foundation.Decimal](https://forums.swift.org/t/fixedpointdecimal-exact-decimal-arithmetic-50x-1000x-faster-than-foundation-decimal/85642)

<div class="topic-metadata">

**Author:** [@hassila](https://forums.swift.org/u/hassila)\
**Replies:** 13\
**Last updated:** [April 7, 2026, 7:15pm UTC](https://forums.swift.org/t/fixedpointdecimal-exact-decimal-arithmetic-50x-1000x-faster-than-foundation-decimal/85642 "2026-04-07T19:15:56Z")

</div>

FixedPointDecimal — high-performance fixed-point decimal arithmetic for Swift A few weeks ago we open sourced FuzzyMatch, our fuzzy string matching library built with Claude Code. That experiment went well enough that we…

---

## [\[Pitch\] borrow/mutate accessors, & immutable borrow, and mutating in signatures](https://forums.swift.org/t/pitch-borrow-mutate-accessors-immutable-borrow-and-mutating-in-signatures/85676)

<div class="topic-metadata">

**Author:** [@Arma](https://forums.swift.org/u/Arma)\
**Replies:** 5\
**Last updated:** [April 3, 2026, 6:58pm UTC](https://forums.swift.org/t/pitch-borrow-mutate-accessors-immutable-borrow-and-mutating-in-signatures/85676 "2026-04-03T18:58:13Z")

</div>

Hi everyone, I'd like to share a pitch that grew out of a real performance optimization effort where I was trying to eliminate unnecessary copies in hot loops on Copyable value types. This is my first pitch, so I appre…

---

## [Swift, ARC and memory footprint vs JVM and GC](https://forums.swift.org/t/swift-arc-and-memory-footprint-vs-jvm-and-gc/73151)

<div class="topic-metadata">

**Author:** [@rysurd](https://forums.swift.org/u/rysurd)\
**Replies:** 78\
**Last updated:** [March 26, 2026, 7:50am UTC](https://forums.swift.org/t/swift-arc-and-memory-footprint-vs-jvm-and-gc/73151 "2026-03-26T07:50:53Z")

</div>

Hello dear community, This is my first post in this forum so, if my question seems trivial or idiotic, don't blame me too much haha. This being said, I wanted to gather feedbacks and opinions about ARC vs GC memory foot…

---

## [Improving Type Name Computation Performance](https://forums.swift.org/t/improving-type-name-computation-performance/85076)

<div class="topic-metadata">

**Author:** [@k.benua](https://forums.swift.org/u/k.benua)\
**Replies:** 9\
**Last updated:** [March 3, 2026, 6:21am UTC](https://forums.swift.org/t/improving-type-name-computation-performance/85076 "2026-03-03T06:21:32Z")

</div>

Improving Type Name Computation Performance Introduction The recommended way to obtain a type name from a generic type parameter is: String(describing: type(of:)) — returns the type name without the module prefix S…

---

## [Implementing optimization comments in \`indexstore-db\`?](https://forums.swift.org/t/implementing-optimization-comments-in-indexstore-db/80807)

<div class="topic-metadata">

**Author:** [@moshe-foreflight](https://forums.swift.org/u/moshe-foreflight)\
**Replies:** 2\
**Last updated:** [December 15, 2025, 5:23pm UTC](https://forums.swift.org/t/implementing-optimization-comments-in-indexstore-db/80807 "2025-12-15T17:23:39Z")

</div>

I'm looking to optimize performance of indexstore-db based on two FIXMEs in the code that appear in the code. I'm looking for advice on how to implement (or request help implementing) them. Goal: I would like to be ab…

---

## [String.replacing performance](https://forums.swift.org/t/string-replacing-performance/68679)

<div class="topic-metadata">

**Author:** [@danielpunkass](https://forums.swift.org/u/danielpunkass)\
**Replies:** 6\
**Last updated:** [November 17, 2025, 2:43pm UTC](https://forums.swift.org/t/string-replacing-performance/68679 "2025-11-17T14:43:26Z")

</div>

Recently, upon spotting a use of Regex in the wild to achieve the equivalent of a literal string replacement, I wondered about the performance implications of using Regex this way. To my surprise, I learned that using S…

---

## [SE-0496: \`@inline(always)\` Attribute](https://forums.swift.org/t/se-0496-inline-always-attribute/82480)

<div class="topic-metadata">

**Author:** [@allevato](https://forums.swift.org/u/allevato)\
**Replies:** 23\
**Last updated:** [October 23, 2025, 1:11pm UTC](https://forums.swift.org/t/se-0496-inline-always-attribute/82480 "2025-10-23T13:11:49Z")

</div>

Hello, Swift community! The review of SE-0496: @inline(always) Attribute begins now and runs through October 16th, 2025. Reviews are an important part of the Swift evolution process. All review feedback should be eithe…

---

## [Pitch: Conditional Property Setters with set(when:)](https://forums.swift.org/t/pitch-conditional-property-setters-with-set-when/82342)

<div class="topic-metadata">

**Author:** [@sdmarcotte](https://forums.swift.org/u/sdmarcotte)\
**Replies:** 0\
**Last updated:** [September 24, 2025, 7:02pm UTC](https://forums.swift.org/t/pitch-conditional-property-setters-with-set-when/82342 "2025-09-24T19:02:47Z")

</div>

Pitch: Conditional Property Setters with set(when:) Problem Swift's property observers (willSet/didSet) are called on every assignment, even when the assigned value is identical to the current value. This creates unneces…

---

## [Announcing swift-parca: low-overhead continuous profiling for Swift on Server](https://forums.swift.org/t/announcing-swift-parca-low-overhead-continuous-profiling-for-swift-on-server/81823)

<div class="topic-metadata">

**Author:** [@Sarunas](https://forums.swift.org/u/Sarunas)\
**Replies:** 4\
**Last updated:** [September 17, 2025, 7:52am UTC](https://forums.swift.org/t/announcing-swift-parca-low-overhead-continuous-profiling-for-swift-on-server/81823 "2025-09-17T07:52:19Z")

</div>

At Ordo One, we’ve been using perf\_events + FlameGraph for a number of years to investigate Swift performance on Linux, but the manual sampling approach has limitations - you need to know when and what to profile, making…

---

## [Improving JSONDecoder/Encoder Performance for large apps](https://forums.swift.org/t/improving-jsondecoder-encoder-performance-for-large-apps/81839)

<div class="topic-metadata">

**Author:** [@k.benua](https://forums.swift.org/u/k.benua)\
**Replies:** 11\
**Last updated:** [September 8, 2025, 9:28pm UTC](https://forums.swift.org/t/improving-jsondecoder-encoder-performance-for-large-apps/81839 "2025-09-08T21:28:38Z")

</div>

Table of Contents Purpose JSONDecoder/Encoder Performance Problem JSONDecoder Performance Flaws Proposed Optimizations Optimizations Results Apple Benchmark Overview Apple Benchmark Flaws My Benchm…

---

## [Model messages using collection types other than \`Array\`](https://forums.swift.org/t/model-messages-using-collection-types-other-than-array/81660)

<div class="topic-metadata">

**Author:** [@RandomHashTags](https://forums.swift.org/u/RandomHashTags)\
**Replies:** 3\
**Last updated:** [August 15, 2025, 3:35pm UTC](https://forums.swift.org/t/model-messages-using-collection-types-other-than-array/81660 "2025-08-15T15:35:06Z")

</div>

I’m migrating a project to support protocol buffers to be stored optimally in a database, but I need a way to efficiently use ContiguousArray and Set (+ InlineArray and noncopyables in the future?) types at runtime for d…

---

## [Assessing Performance Impact on the Runtime](https://forums.swift.org/t/assessing-performance-impact-on-the-runtime/81506)

<div class="topic-metadata">

**Author:** [@compnerd](https://forums.swift.org/u/compnerd)\
**Replies:** 0\
**Last updated:** [August 5, 2025, 4:37pm UTC](https://forums.swift.org/t/assessing-performance-impact-on-the-runtime/81506 "2025-08-05T16:37:14Z")

</div>

I am looking for some help identifying a reasonable a good mechanism for measuring the performance impact of some changes that I am toying around for the runtime on Windows. Given the previously shared plan for Windows …

---

## [Modern Concurrency Adoption in Legacy Codebases: How do we balance async/await with team skill gaps?](https://forums.swift.org/t/modern-concurrency-adoption-in-legacy-codebases-how-do-we-balance-async-await-with-team-skill-gaps/81227)

<div class="topic-metadata">

**Author:** [@coderlegion](https://forums.swift.org/u/coderlegion)\
**Replies:** 2\
**Last updated:** [July 21, 2025, 11:30pm UTC](https://forums.swift.org/t/modern-concurrency-adoption-in-legacy-codebases-how-do-we-balance-async-await-with-team-skill-gaps/81227 "2025-07-21T23:30:41Z")

</div>

We're migrating a healthcare iOS app (350k LOC, Swift 4.2 → 5.9) and facing friction adopting Swift Concurrency: // Legacy networking causing issues func fetchPatientRecords(completion: @escaping (Result\<\[Record\], Error\>…

---

## [Huge performance hit from exclusive memory access checks](https://forums.swift.org/t/huge-performance-hit-from-exclusive-memory-access-checks/54374)

<div class="topic-metadata">

**Author:** [@Yup\_Lucas](https://forums.swift.org/u/Yup_Lucas)\
**Replies:** 16\
**Last updated:** [June 13, 2025, 10:45pm UTC](https://forums.swift.org/t/huge-performance-hit-from-exclusive-memory-access-checks/54374 "2025-06-13T22:45:02Z")

</div>

Hi there, tl;dr Writing to an array in a tight loop gets really slow because of memory exclusivity checks. What's the recommended way to avoid that? I implemented a decoder/encoder for an image format called QOI. My n…

---

## [How do I get swift-inspect to work on macOS](https://forums.swift.org/t/how-do-i-get-swift-inspect-to-work-on-macos/70648)

<div class="topic-metadata">

**Author:** [@hassila](https://forums.swift.org/u/hassila)\
**Replies:** 27\
**Last updated:** [April 25, 2025, 4:39pm UTC](https://forums.swift.org/t/how-do-i-get-swift-inspect-to-work-on-macos/70648 "2025-04-25T16:39:41Z")

</div>

After recently hearing about swift-inspect I now wanted to take it for a spin and see what can be gleaned - but I simply can't get it to work; Anyone who has it working? E.g. (86026 is a process started by me): hassil…

---

## [Parsing performance and exclusivity checks](https://forums.swift.org/t/parsing-performance-and-exclusivity-checks/79333)

<div class="topic-metadata">

**Author:** [@FlorianPircher](https://forums.swift.org/u/FlorianPircher)\
**Replies:** 7\
**Last updated:** [April 17, 2025, 10:38pm UTC](https://forums.swift.org/t/parsing-performance-and-exclusivity-checks/79333 "2025-04-17T22:38:08Z")

</div>

I am working on a parser that reads large property list files (OpenStep/old-style plist, larger files around 20 MB to 200 MB). Speed is of paramount importance. I am only interested in certain top-level key–value pairs, …

---

## [Partitioning work across parallel tasks doesn’t seem to benefit from parallelism](https://forums.swift.org/t/partitioning-work-across-parallel-tasks-doesn-t-seem-to-benefit-from-parallelism/79044)

<div class="topic-metadata">

**Author:** [@taylorswift](https://forums.swift.org/u/taylorswift)\
**Replies:** 0\
**Last updated:** [April 2, 2025, 11:47pm UTC](https://forums.swift.org/t/partitioning-work-across-parallel-tasks-doesn-t-seem-to-benefit-from-parallelism/79044 "2025-04-02T23:47:12Z")

</div>

the following test program just doesn’t seem to be benefiting from TaskGroup parallelism at all (beyond a marginal improvement from n=1 to n=2 cores), despite running on an 8-core machine. although i have marked Partiti…

---

## [\[Pitch\] MutableSpan](https://forums.swift.org/t/pitch-mutablespan/77790)

<div class="topic-metadata">

**Author:** [@glessard](https://forums.swift.org/u/glessard)\
**Replies:** 47\
**Last updated:** [February 24, 2025, 5:59pm UTC](https://forums.swift.org/t/pitch-mutablespan/77790 "2025-02-24T17:59:56Z")

</div>

Hello everyone! Continuing on from adding Span/RawSpan (SE-0447) and the computed properties that return them (SE-0456), this is a pitch for MutableSpan and MutableRawSpan, helper types to delegate mutations of exclusive…

---

## [Compiler optimization with computed properties](https://forums.swift.org/t/compiler-optimization-with-computed-properties/77861)

<div class="topic-metadata">

**Author:** [@giik](https://forums.swift.org/u/giik)\
**Replies:** 1\
**Last updated:** [February 13, 2025, 9:44pm UTC](https://forums.swift.org/t/compiler-optimization-with-computed-properties/77861 "2025-02-13T21:44:48Z")

</div>

If the body of a computed property references another computed property multiple times, are there any guarantees—and if yes, under what conditions—that the latter will be optimized to a singular local value computation t…

[Next page](https://forums.swift.org/tag/performance/37.md?match_all_tags=true&page=1&tags%5B%5D=performance)
