Benchmarking the Apple M1 Processor

Apple recently released their new M1 Processor in their Macbook product line-up. I’ve known for a while that the Apple Silicon in IPhones is very fast, but I have never measured it myself. However, my wife’s old Macbook Pro (2014) just broke so we decided to purchase the new 13" Macbook Air with M1 Processor. Of course, I had to take it for a little spin. : )

Recently I have been relying upon benchmark tools such as Google Benchmark and nanobench to help ensure statistically reliable comparisons for many of my open source code. A very recent and incomplete library I made is called simplifyline. It basically performs line simplification using the Douglas-Peucker algorithm. Honestly there’s nothing special about the library except that its written in C++ with Python bindings and pays close attention to performance. I was honestly just interested in making the library and experimenting on different implementations for the algorithm. However, the library is very simple to build and has one benchmark, allowing me to compare my AMD 3900X CPU desktop computer against my wifes M1 Macbook Air. Due note that the benchmark is completely single threaded and has only one test so it’s not too useful.

Results

The library is basically a port of this javascript library. Example 1 is the same one on the website! “HQ” indicates if high quality is enabled, which if enabled (true) will not preprocess the line to filter extraneous points by radial distance. The first column is microseconds per operation (line simplification). The takeaway is that my 3900X is about 33-50% slower than the Apple M1 in this benchmark. Remember, take these results of a single benchmark with a HUGE grain of salt, and look here for a more thorough comparison.

Benchmark on Apple Macbook Air M1 2020:

us/op op/s err% total Examples
74.29 13,460.16 0.3% 0.09 Example 1 RadialDist
376.86 2,653.51 0.2% 0.46 Example 1 SimplifyLine, HQ=False
1,427.19 700.68 0.0% 1.73 Example 1 SimplifyLine, HQ=True

Benchmark on AMD Ryzen 3900X (Linux):

us/op op/s err% total Examples
105.28 9,498.69 0.1% 0.13 Example 1 RadialDist
518.48 1,928.71 0.5% 0.63 Example 1 SimplifyLine, HQ=False
2,348.80 425.75 0.4% 2.84 Example 1 SimplifyLine, HQ=True

Benchmark on AMD Ryzen 3900X (Windows):

us/op op/s err% total Examples
88.55 11,293.55 0.5% 0.11 Example 1 RadialDist
630.79 1,585.31 0.5% 0.77 Example 1 SimplifyLine, HQ=False
3,864.53 258.76 0.3% 4.68 Example 1 SimplifyLine, HQ=True
Last updated: