The Accelerate framework contains many high performance matrix math, linear algebra, image processing, and digital signal processing functions, but suffers from a somewhat unusual syntax when compared to other iOS frameworks. Last month I mentioned a library inspired by Python’s NumPy that uses the accelerate framework for performing math called Swix.
Here’s a nice Swift based wrapper library for the Accelerate framework from Matt Thompson called Surge. Surge wraps the unusual syntax of many Accelerate functions into a nice simple syntax.
This performance comparison from the readme :
let numbers: [Double] = … // 1000000 Elements
var sum: Double = 0.0
// Naïve Swift Implementation
sum = reduce(numbers, 0.0, +) // Time: 5.700 sec (2% STDEV)
// Surge Implementation
sum = Surge.sum(numbers) // Time: 0.001 sec (17% STDEV)
Resulted in a performance increase of 5,700x speed increase with the size of numbers at 1,000,000 elements using Surge vs. the native Swift math implementation.
You can find Surge on Github here.
If you’re unfamiliar with the Accelerate framework this is a nice introductory video from WWDC 2013 Apple developer login required.
A great library for utilizing the accelerate framework.
Thanks to Chris for the submission.
- An Open Source Swift Math Library Inspired By Python’s NumPy
- Open Source Swift Library Simplifying Use Of NSURLSession
- Extensive Open Source Swift Based Cryptography Helper Library (MD5, SHA1, SHA256)
- An Open Source Library That Makes Working With JSON Data Using Swift Much Easier
- Open Source Swift Library Providing A Nice Implementation of Promises
Original article: Open Source Swift Based Library That Wraps The Accelerate Framework For Easier Usage
©2014 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.




