Apple's Swift benchmark suite is now open source

Open source benchmarks aim to track Swift performance and catch performance regressions.
Written by Steve Ranger, Global News Director

Apple has added to the tools surrounding its Swift programming language.

Apple has made its Swift benchmark suite open source, having made the programming language itself open source late last year. The suite contains source code for benchmarks, libraries, and utilities designed to help track Swift performance.

Apple said the suite includes 75 benchmarks "covering a number of important Swift workloads", plus libraries of commonly needed benchmarking functions, a driver for running benchmarks and displaying performance metrics, and a utility for comparing benchmark metrics across Swift versions

Apple introduced Swift, a general-purpose programming language aimed at replacing C-based languages (C, C++, and Objective-C), back in 2014. Since then it has seen rapid adoption, particularly after Apple made it open source late last year.

Apple wants contributors to the Swift project to run Swift's benchmark suite against their changes before requesting pull requests, in order to catch potential performance problems.

The company's Swift team said in the future it is planning to add support to Swift's continuous integration system for running benchmarks on pull requests, and said that contributions to Swift's benchmark suite -- such as pull requests for new benchmarks covering performance-critical workloads and additions to benchmark helper libraries -- are encouraged.

But it added: "Please note that Swift's benchmark suite shares the Swift project's license, so we are unable to accept Swift ports of benchmarks covered under other licenses."

Read more about Swift

Editorial standards