# Benchmark

**URL:** https://forums.swift.org/c/related-projects/benchmark/105.md

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

---

## [About the Benchmark category](https://forums.swift.org/t/about-the-benchmark-category/68781)

<div class="topic-metadata">

**Author:** [@mishal\_shah](https://forums.swift.org/u/mishal_shah)\
**Replies:** 0

</div>

Swift benchmark runner with many performance metrics and great CI support.

---

## [Ordo-one/benchmark aggregated allocation stacks](https://forums.swift.org/t/ordo-one-benchmark-aggregated-allocation-stacks/90018)

<div class="topic-metadata">

**Author:** [@supersonicbyte](https://forums.swift.org/u/supersonicbyte)\
**Replies:** 0\
**Last updated:** [October 12, 2026, 11:51am UTC](https://forums.swift.org/t/ordo-one-benchmark-aggregated-allocation-stacks/90018 "2026-10-12T11:51:07Z")

</div>

Hey everyone! Benchmark now supports allocation-stack recording for easily tracking down root causes of memory allocations. An allocation-stack shows the chain of function calls that led to a heap allocation, helping yo…

---

## [How seriously should I take Benchmark results ran on swift-next snapshots?](https://forums.swift.org/t/how-seriously-should-i-take-benchmark-results-ran-on-swift-next-snapshots/89117)

<div class="topic-metadata">

**Author:** [@MahdiBM](https://forums.swift.org/u/MahdiBM)\
**Replies:** 5\
**Last updated:** [August 23, 2026, 9:41am UTC](https://forums.swift.org/t/how-seriously-should-i-take-benchmark-results-ran-on-swift-next-snapshots/89117 "2026-08-23T09:41:30Z")

</div>

I just ran a round of a package's benchmarks with 6.4.x-snapshot which is installed via swiftly. The default Swift version is Swift 6.3 (swiftly again). This is on Ubuntu 24.04. The results are mixed, more on the side…

---

## [Ordo-one/benchmark drops dependency on jemalloc](https://forums.swift.org/t/ordo-one-benchmark-drops-dependency-on-jemalloc/87624)

<div class="topic-metadata">

**Author:** [@hassila](https://forums.swift.org/u/hassila)\
**Replies:** 1\
**Last updated:** [July 5, 2026, 8:39pm UTC](https://forums.swift.org/t/ordo-one-benchmark-drops-dependency-on-jemalloc/87624 "2026-07-05T20:39:01Z")

</div>

Hi everyone! We are happy to announce that there's a new version of Benchmark (previously known as package-benchmark) out today, ordo-one/benchmark 1.35.0 which finally weans the package of the jemalloc dependency for m…

---

## [Swift 6 support added](https://forums.swift.org/t/swift-6-support-added/77799)

<div class="topic-metadata">

**Author:** [@hassila](https://forums.swift.org/u/hassila)\
**Replies:** 0\
**Last updated:** [February 11, 2025, 12:59pm UTC](https://forums.swift.org/t/swift-6-support-added/77799 "2025-02-11T12:59:51Z")

</div>

Please see Release 1.28.0 · ordo-one/package-benchmark · GitHub for details, please file issues for anything else blocking from migrating benchmark targets to Swift 6 (works for the straightforward cases in test). This …

---

## [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 for use within a module](https://forums.swift.org/t/benchmark-for-use-within-a-module/76061)

<div class="topic-metadata">

**Author:** [@pnewell](https://forums.swift.org/u/pnewell)\
**Replies:** 5\
**Last updated:** [November 17, 2024, 3:27pm UTC](https://forums.swift.org/t/benchmark-for-use-within-a-module/76061 "2024-11-17T15:27:19Z")

</div>

Is Benchmark appropriate for us to measure things within a module? Specifically, if there are certain areas I want to track and measure performance of in production, is it safe/a good idea to use it for that? Anything to…

---

## [Baseline and thresholds commands difference](https://forums.swift.org/t/baseline-and-thresholds-commands-difference/75349)

<div class="topic-metadata">

**Author:** [@Kyle-Ye](https://forums.swift.org/u/Kyle-Ye)\
**Replies:** 6\
**Last updated:** [October 21, 2024, 11:33am UTC](https://forums.swift.org/t/baseline-and-thresholds-commands-difference/75349 "2024-10-21T11:33:29Z")

</div>

Got a little confusing for the baseline and thresholds commands usage. For example, I've created some predefined thresholds here on Thresholds/DemoKit/1.0/DemoBenchmark.A.example1.p90.json { "cpuTotal" : 409599, "i…

---

## [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…

---

## [Support for parameterisation](https://forums.swift.org/t/support-for-parameterisation/75099)

<div class="topic-metadata">

**Author:** [@hassila](https://forums.swift.org/u/hassila)\
**Replies:** 0\
**Last updated:** [October 2, 2024, 7:33am UTC](https://forums.swift.org/t/support-for-parameterisation/75099 "2024-10-02T07:33:48Z")

</div>

Thanks to the contribution of @CrownedPhoenix we now have support for tagging parametrised benchmarks which allows for nicer output without having to change the benchmark name based on the paramterization, e.g.: \[50…

---

## [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…

---

## [Benchmarking Swift NIO and other Server Setups like Vapor](https://forums.swift.org/t/benchmarking-swift-nio-and-other-server-setups-like-vapor/73294)

<div class="topic-metadata">

**Author:** [@dimi](https://forums.swift.org/u/dimi)\
**Replies:** 5\
**Last updated:** [August 12, 2024, 7:33pm UTC](https://forums.swift.org/t/benchmarking-swift-nio-and-other-server-setups-like-vapor/73294 "2024-08-12T19:33:12Z")

</div>

Has anyone attempted to use Benchmark to profile Swift NIO, Vapor and related APIs yet? I'm attempting to bind a server, but when running via swift package benchmark, I'm getting the following error: failed with bind(des…

---

## [Build error with very simple benchmark package](https://forums.swift.org/t/build-error-with-very-simple-benchmark-package/72685)

<div class="topic-metadata">

**Author:** [@sliemeobn](https://forums.swift.org/u/sliemeobn)\
**Replies:** 3\
**Last updated:** [June 23, 2024, 4:30pm UTC](https://forums.swift.org/t/build-error-with-very-simple-benchmark-package/72685 "2024-06-23T16:30:00Z")

</div>

I wanted to add benchmarks to my project, but could not get it to run. Source code is here Here is what I see when running swift package benchmark: a plain new benchmark target with a dummy benchmark works just fine o…

---

## [Benchmark support for CPU instruction counts](https://forums.swift.org/t/benchmark-support-for-cpu-instruction-counts/71423)

<div class="topic-metadata">

**Author:** [@hassila](https://forums.swift.org/u/hassila)\
**Replies:** 1\
**Last updated:** [April 23, 2024, 5:33pm UTC](https://forums.swift.org/t/benchmark-support-for-cpu-instruction-counts/71423 "2024-04-23T17:33:37Z")

</div>

Happy to announce that the latest version of Benchmark now supports CPU instructions retired statistics. This is done using perf\_events on Linux and using rusage on macOS. For benchmarks running in a VM, this met…

---

## [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…

---

## [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…

---

## [\[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…
