# \#benchmarks

**URL:** https://forums.swift.org/tag/benchmarks/47.md

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

---

## [Benchmarking different RegEx implementations](https://forums.swift.org/t/benchmarking-different-regex-implementations/90008)

<div class="topic-metadata">

**Author:** [@LeoAvMo](https://forums.swift.org/u/LeoAvMo)\
**Replies:** 3\
**Last updated:** [October 12, 2026, 10:43pm UTC](https://forums.swift.org/t/benchmarking-different-regex-implementations/90008 "2026-10-12T22:43:55Z")

</div>

As part of my compilers class, the teacher told me that we will be coming across with Regular Expressions (RegEx). Since I want to do the project in Swift, I tried experimenting today with the ways to do RegExs. After so…

---

## [Swift vs Rust on a single Lambda](https://forums.swift.org/t/swift-vs-rust-on-a-single-lambda/87039)

<div class="topic-metadata">

**Author:** [@sebsto](https://forums.swift.org/u/sebsto)\
**Replies:** 3\
**Last updated:** [June 3, 2026, 2:44pm UTC](https://forums.swift.org/t/swift-vs-rust-on-a-single-lambda/87039 "2026-06-03T14:44:48Z")

</div>

I wrote a Swift 6 Lambda that zips 15 GB of S3 objects in one invocation, streaming end to end on 512 MB arm64. It was a challenge posted by Jérémie Rodon (RustyServerless) who built the Rust reference implementation. T…

---

## [Performance of Accelerate framework vs Swift on Apple Silicon](https://forums.swift.org/t/performance-of-accelerate-framework-vs-swift-on-apple-silicon/80919)

<div class="topic-metadata">

**Author:** [@wigging](https://forums.swift.org/u/wigging)\
**Replies:** 16\
**Last updated:** [July 6, 2025, 9:25pm UTC](https://forums.swift.org/t/performance-of-accelerate-framework-vs-swift-on-apple-silicon/80919 "2025-07-06T21:25:57Z")

</div>

I finally upgraded from Intel to Apple Silicon with a M4 MacBook Air. I was curious about the performance of Accelerate on the new Mac so I ran some benchmarks on large vector addition. Swift example Below is a basic Sw…

---

## [How to handle warm-up cost of a benchmark function](https://forums.swift.org/t/how-to-handle-warm-up-cost-of-a-benchmark-function/79358)

<div class="topic-metadata">

**Author:** [@wigging](https://forums.swift.org/u/wigging)\
**Replies:** 6\
**Last updated:** [April 18, 2025, 10:47pm UTC](https://forums.swift.org/t/how-to-handle-warm-up-cost-of-a-benchmark-function/79358 "2025-04-18T22:47:20Z")

</div>

I have a benchmark function as defined below. It reports times in milliseconds (ms). import Accelerate func benchmark(\_ label: String, niter: Int = 5, operation: () -\> ()) { print("\\n\\(label)") var times = \[Dou…

---

## [Introducing LCLWebSocket: a lightweight websocket client and server library!](https://forums.swift.org/t/introducing-lclwebsocket-a-lightweight-websocket-client-and-server-library/77308)

<div class="topic-metadata">

**Author:** [@johnnzhou](https://forums.swift.org/u/johnnzhou)\
**Replies:** 2\
**Last updated:** [January 21, 2025, 1:53am UTC](https://forums.swift.org/t/introducing-lclwebsocket-a-lightweight-websocket-client-and-server-library/77308 "2025-01-21T01:53:07Z")

</div>

Hi! We are excited to announce the release of lcl-websocket. It is a lightweight websocket library designed to for both client and server to streamline websocket communications. We are a group of researchers and volunt…

---

## [Spreading benchmarks across multiple files?](https://forums.swift.org/t/spreading-benchmarks-across-multiple-files/76070)

<div class="topic-metadata">

**Author:** [@Joseph\_Heck](https://forums.swift.org/u/Joseph_Heck)\
**Replies:** 3\
**Last updated:** [January 10, 2025, 3:19pm UTC](https://forums.swift.org/t/spreading-benchmarks-across-multiple-files/76070 "2025-01-10T15:19:15Z")

</div>

I've been dropping in benchmarks in a single, top-level global for the package-benchmark system to pick them up and run them, basically something akin to: let benchmarks = { Benchmark("SeedHeightmap") { benchmark i…

---

## [Benchmark in Swift Testing](https://forums.swift.org/t/benchmark-in-swift-testing/75582)

<div class="topic-metadata">

**Author:** [@Gumichocopengin8](https://forums.swift.org/u/Gumichocopengin8)\
**Replies:** 7\
**Last updated:** [October 24, 2024, 1:13pm UTC](https://forums.swift.org/t/benchmark-in-swift-testing/75582 "2024-10-24T13:13:52Z")

</div>

Swift Testing does not include benchmark test as far as I see the doc. Do we still need to use XCTest for it? and will Swift Testing have benchmark suite as well in the future? func testPerformanceExample() { self.…

---

## [New release 1.27.0: Improved support for static thresholds and clarification of documentation](https://forums.swift.org/t/new-release-1-27-0-improved-support-for-static-thresholds-and-clarification-of-documentation/75161)

<div class="topic-metadata">

**Author:** [@hassila](https://forums.swift.org/u/hassila)\
**Replies:** 0\
**Last updated:** [October 4, 2024, 4:15pm UTC](https://forums.swift.org/t/new-release-1-27-0-improved-support-for-static-thresholds-and-clarification-of-documentation/75161 "2024-10-04T16:15:12Z")

</div>

What's Changed Adding support for new thresholds subcommands - used for storing/reading/checking against static saved thresholds - by default output into Thresholds in the current directory, but location can be specified…

---

## [Using benchmarking to guard against gradual performance regressions](https://forums.swift.org/t/using-benchmarking-to-guard-against-gradual-performance-regressions/74493)

<div class="topic-metadata">

**Author:** [@jeremyabannister](https://forums.swift.org/u/jeremyabannister)\
**Replies:** 6\
**Last updated:** [September 10, 2024, 10:47pm UTC](https://forums.swift.org/t/using-benchmarking-to-guard-against-gradual-performance-regressions/74493 "2024-09-10T22:47:07Z")

</div>

I recently dove into benchmarking and the awesome new Benchmark package (thanks @hassila) and one thing that quickly came to mind is the possibility of gradual regressions that can slip by undetected. I'm making this thr…

---

## [Introducing LCLPing: a lightweight ping library for latency and reachability measurement](https://forums.swift.org/t/introducing-lclping-a-lightweight-ping-library-for-latency-and-reachability-measurement/72694)

<div class="topic-metadata">

**Author:** [@johnnzhou](https://forums.swift.org/u/johnnzhou)\
**Replies:** 0\
**Last updated:** [June 23, 2024, 7:48pm UTC](https://forums.swift.org/t/introducing-lclping-a-lightweight-ping-library-for-latency-and-reachability-measurement/72694 "2024-06-23T19:48:51Z")

</div>

Hi! We are excited to announce the release of lcl-ping, a lightweight library designed to measure and monitor network reachability and latency for both client-side and server-side applications. We are a group of resear…

---

## ['Standard' vapor website drops 1.5% of requests, even at concurrency of 100!](https://forums.swift.org/t/standard-vapor-website-drops-1-5-of-requests-even-at-concurrency-of-100/71583)

<div class="topic-metadata">

**Author:** [@axello](https://forums.swift.org/u/axello)\
**Replies:** 174\
**Last updated:** [May 26, 2024, 5:55pm UTC](https://forums.swift.org/t/standard-vapor-website-drops-1-5-of-requests-even-at-concurrency-of-100/71583 "2024-05-26T17:55:47Z")

</div>

I have been researching the server impacts of 4 different backend technologies for their environmental impact. This was for a talk I gave in Amsterdam. I've been benchmarking Node.js, php, java and vapor. During my rese…

---

## [Swift performance similar to Python?](https://forums.swift.org/t/swift-performance-similar-to-python/32604)

<div class="topic-metadata">

**Author:** [@joaqo](https://forums.swift.org/u/joaqo)\
**Replies:** 6\
**Last updated:** [January 15, 2020, 7:12pm UTC](https://forums.swift.org/t/swift-performance-similar-to-python/32604 "2020-01-15T19:12:20Z")

</div>

Been trying some dumb benchmarks, which I'm sure are really flawed, but which I think may be a good learning opportunity on how Swift works under the hood: As you can see Swift seems to be slower than Python in this p…

---

## [Munchausen benchmark](https://forums.swift.org/t/munchausen-benchmark/69798)

<div class="topic-metadata">

**Author:** [@Finagolfin](https://forums.swift.org/u/Finagolfin)\
**Replies:** 20\
**Last updated:** [February 5, 2024, 5:05pm UTC](https://forums.swift.org/t/munchausen-benchmark/69798 "2024-02-05T17:05:22Z")

</div>

I saw this simple integer benchmark on lobste.rs and just submitted a Swift version. If you see any way to speed it up, let me know. Purely aesthetically, I didn't like that I had to do the two numeric conversions and th…

---

## [Package-benchmark 0.6.0 released](https://forums.swift.org/t/package-benchmark-0-6-0-released/63103)

<div class="topic-metadata">

**Author:** [@hassila](https://forums.swift.org/u/hassila)\
**Replies:** 0\
**Last updated:** [February 13, 2023, 2:49pm UTC](https://forums.swift.org/t/package-benchmark-0-6-0-released/63103 "2023-02-13T14:49:25Z")

</div>

I'm happy to share a new version (0.6.0) of the package-benchmark SwiftPM command plugin - this release has one major feature and addresses one of the most common sources of confusion of the results - it's now based on t…

---

## [Add a blackHole function](https://forums.swift.org/t/add-a-blackhole-function/46862)

<div class="topic-metadata">

**Author:** [@Karl](https://forums.swift.org/u/Karl)\
**Replies:** 19\
**Last updated:** [September 7, 2023, 11:33pm UTC](https://forums.swift.org/t/add-a-blackhole-function/46862 "2023-09-07T23:33:06Z")

</div>

Hi! I've recently been using the excellent swift-benchmark package: GitHub - google/swift-benchmark: A swift library to benchmark code snippets. (which I hope Apple/Swift.org will adopt one day - it needs to be fleshed-…

---

## [Histogram (HDR Histogram native Swift port) package](https://forums.swift.org/t/histogram-hdr-histogram-native-swift-port-package/63060)

<div class="topic-metadata">

**Author:** [@hassila](https://forums.swift.org/u/hassila)\
**Replies:** 3\
**Last updated:** [September 5, 2023, 11:26am UTC](https://forums.swift.org/t/histogram-hdr-histogram-native-swift-port-package/63060 "2023-09-05T11:26:17Z")

</div>

We are happy to share Histogram with the community and hope it will be useful for many of you. Histogram is a port of Gil Tene's High Dynamic Range (HDR) Histogram to native Swift. It provides recording and analyzing of…

---

## [Compiler swallows \`blackHole(\_:)\`](https://forums.swift.org/t/compiler-swallows-blackhole/64305)

<div class="topic-metadata">

**Author:** [@oscbyspro](https://forums.swift.org/u/oscbyspro)\
**Replies:** 9\
**Last updated:** [August 22, 2023, 10:29am UTC](https://forums.swift.org/t/compiler-swallows-blackhole/64305 "2023-08-22T10:29:46Z")

</div>

I'm trying to measure something, but I'm getting rug-pulled by the compiler. While I appreciate its attempts at making my code run faster, I need a reliable way of preventing it from erasing my benchmarks. I have tried u…

---

## [Benchmark stable release](https://forums.swift.org/t/benchmark-stable-release/63902)

<div class="topic-metadata">

**Author:** [@hassila](https://forums.swift.org/u/hassila)\
**Replies:** 5\
**Last updated:** [March 28, 2023, 4:34pm UTC](https://forums.swift.org/t/benchmark-stable-release/63902 "2023-03-28T16:34:24Z")

</div>

Hi, We're happy to announce that Benchmark now has shipped with what we believe is an API stable interface (which follows semantic versioning) with significantly improved capabilities compared to the initial release las…

---

## [Benchmark package initial release](https://forums.swift.org/t/benchmark-package-initial-release/60535)

<div class="topic-metadata">

**Author:** [@hassila](https://forums.swift.org/u/hassila)\
**Replies:** 62\
**Last updated:** [March 23, 2023, 8:30am UTC](https://forums.swift.org/t/benchmark-package-initial-release/60535 "2023-03-23T08:30:53Z")

</div>

I'm happy to announce that a first release of the Benchmark SwiftPM command plugin is available which supports both macOS and Linux (tested on Ubuntu) with Swift 5.6 or later. There's a sample project showing various Be…

---

## [Why benchmark dies with \<Signals.SIGABRT: 6\>](https://forums.swift.org/t/why-benchmark-dies-with-signals-sigabrt-6/62682)

<div class="topic-metadata">

**Author:** [@valeriyvan](https://forums.swift.org/u/valeriyvan)\
**Replies:** 0\
**Last updated:** [January 20, 2023, 9:24am UTC](https://forums.swift.org/t/why-benchmark-dies-with-signals-sigabrt-6/62682 "2023-01-20T09:24:42Z")

</div>

I have benchmark which dies with \<Signals.SIGABRT: 6\>. Any suggestion why this happens and how to debug this? Regards, Valeriy Van

---

## [\[pitch\] Swift Benchmarking Infrastructure](https://forums.swift.org/t/pitch-swift-benchmarking-infrastructure/59585)

<div class="topic-metadata">

**Author:** [@hassila](https://forums.swift.org/u/hassila)\
**Replies:** 12\
**Last updated:** [September 27, 2022, 3:53pm UTC](https://forums.swift.org/t/pitch-swift-benchmarking-infrastructure/59585 "2022-09-27T15:53:07Z")

</div>

Swift Benchmarking Infrastructure (SwiftPM/swift-corelibs-xctest) Proposal: SPM-NNNN Authors: Joakim Hassila Status: Pitch Introduction There's a need for ease(ier)-to-use benchmarking infrastructure for Swift project…

---

## [Locally benchmarking changes to Swift](https://forums.swift.org/t/locally-benchmarking-changes-to-swift/54261)

<div class="topic-metadata">

**Author:** [@Saklad5](https://forums.swift.org/u/Saklad5)\
**Replies:** 1\
**Last updated:** [January 7, 2022, 4:33pm UTC](https://forums.swift.org/t/locally-benchmarking-changes-to-swift/54261 "2022-01-07T16:33:28Z")

</div>

I’m attempting to make some optimizations to the Swift standard library that should enable more elision of bounds-checking. In the interest of not wasting everyone’s time, I’ve been trying to run benchmark comparisons on…

---

## [Prevent optimizer from culling my benchmark](https://forums.swift.org/t/prevent-optimizer-from-culling-my-benchmark/36545)

<div class="topic-metadata">

**Author:** [@AlexanderM](https://forums.swift.org/u/AlexanderM)\
**Replies:** 0\
**Last updated:** [May 16, 2020, 6:01pm UTC](https://forums.swift.org/t/prevent-optimizer-from-culling-my-benchmark/36545 "2020-05-16T18:01:53Z")

</div>

I'm trying to write a benchmark to quantify the performance of a slow NSOutlineView that I'm trying to optimize. I think the optimizer is outsmarting me, and trying to erase my benchmark (since the sorted data isn't used…

---

## [Towards Robust Performance Measurement](https://forums.swift.org/t/towards-robust-performance-measurement/11490)

<div class="topic-metadata">

**Author:** [@palimondo](https://forums.swift.org/u/palimondo)\
**Replies:** 29\
**Last updated:** [May 21, 2019, 4:15pm UTC](https://forums.swift.org/t/towards-robust-performance-measurement/11490 "2019-05-21T16:15:16Z")

</div>

I’m kind of new around here, still learning about how the project works. On the suggestion from @ben-cohen I started contributing code around Swift Benchmark Suite (more benchmarks for Sequence protocol along with suppor…

---

## [RFC: BenchmarkInfo refactoring](https://forums.swift.org/t/rfc-benchmarkinfo-refactoring/20677)

<div class="topic-metadata">

**Author:** [@palimondo](https://forums.swift.org/u/palimondo)\
**Replies:** 13\
**Last updated:** [May 9, 2019, 10:22pm UTC](https://forums.swift.org/t/rfc-benchmarkinfo-refactoring/20677 "2019-05-09T22:22:29Z")

</div>

I'd like to refactor BenchmarkInfo used in Swift Benchmarking Suite (SBS) to better match the emergent style of writing benchmarks. I think the current order of attributes in BenchmarkInfo is a bit unfortunate. The runF…

---

## [How to profile Swift benchmarks in Instruments](https://forums.swift.org/t/how-to-profile-swift-benchmarks-in-instruments/24267)

<div class="topic-metadata">

**Author:** [@palimondo](https://forums.swift.org/u/palimondo)\
**Replies:** 3\
**Last updated:** [May 9, 2019, 8:25pm UTC](https://forums.swift.org/t/how-to-profile-swift-benchmarks-in-instruments/24267 "2019-05-09T20:25:56Z")

</div>

I was asked this question via DMs and thought the answer might be useful for more people: When profiling individual benchmarks I'll do the following: Open Instruments, Choose Time Profiler template, Choose Target …

---

## [GSOC 2019 Scalability of Swift benchmarking Suite](https://forums.swift.org/t/gsoc-2019-scalability-of-swift-benchmarking-suite/22808)

<div class="topic-metadata">

**Author:** [@Luv](https://forums.swift.org/u/Luv)\
**Replies:** 0\
**Last updated:** [April 8, 2019, 11:40am UTC](https://forums.swift.org/t/gsoc-2019-scalability-of-swift-benchmarking-suite/22808 "2019-04-08T11:40:19Z")

</div>

Hey, I am Luv Gulati, proposing a project for Gsoc 2019 on Scalability of Swift Benchmarking Suite. Need someone's help to read my proposal and review it so that appropriate changes can be done. I want someone look in…

---

## [Changes to how build-script runs benchmarks?](https://forums.swift.org/t/changes-to-how-build-script-runs-benchmarks/18730)

<div class="topic-metadata">

**Author:** [@palimondo](https://forums.swift.org/u/palimondo)\
**Replies:** 3\
**Last updated:** [December 20, 2018, 8:36am UTC](https://forums.swift.org/t/changes-to-how-build-script-runs-benchmarks/18730 "2018-12-20T08:36:21Z")

</div>

In the last two weeks I have noticed weird change in how build-script runs the benchmarks. When executed with following command line options: swift-source $ ./swift/utils/build-script -R -B --no-assertions …all parts o…

---

## [More Representative String Benchmarks](https://forums.swift.org/t/more-representative-string-benchmarks/18793)

<div class="topic-metadata">

**Author:** [@palimondo](https://forums.swift.org/u/palimondo)\
**Replies:** 3\
**Last updated:** [December 14, 2018, 8:18pm UTC](https://forums.swift.org/t/more-representative-string-benchmarks/18793 "2018-12-14T20:18:29Z")

</div>

As I've been going through SBS doing clean-up work, I have noticed that our string benchmarks are in some places trying to cover wider range of scripts, but the selection of test strings is rather ad-hoc. Basically we te…

---

## [Towards Robust Swift Performance](https://forums.swift.org/t/towards-robust-swift-performance/18664)

<div class="topic-metadata">

**Author:** [@palimondo](https://forums.swift.org/u/palimondo)\
**Replies:** 10\
**Last updated:** [December 10, 2018, 10:41pm UTC](https://forums.swift.org/t/towards-robust-swift-performance/18664 "2018-12-10T22:41:03Z")

</div>

:dove::snowflake::sunrise: Unladen soars Swift Winter south of Sahara Airspeed still mirage I've seen a little bit of pushback against some benchmark reforms I’ve proposed, so I'd like to solicit a wider discussion…

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