Skip to content

Commit

Permalink
Add arm64 benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
bwesterb authored Jul 24, 2024
1 parent 7a469d2 commit fd4bd90
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ This shows three benchmarks:
* `purego` are our slightly optimized versions that work on uint64s instead of bytes.
* `asm` are the AVX2 implementations and the reason to use this library.

### Intel Core i9-13900
```
goos: linux
goarch: amd64
Expand All @@ -53,3 +54,30 @@ Memset-32 4.126Gi ± 3% 16.444Gi ± 1% +298.59% (p=0.000 n=10) 59.051Gi
Popcnt-32 7.251Gi ± 1% 13.428Gi ± 0% +85.20% (p=0.000 n=10) 29.288Gi ± 3% +303.94% (p=0.000 n=10)
geomean 4.042Gi 14.22Gi +251.80% 39.49Gi +876.93%
```

### Apple M2 Pro

```
goos: darwin
goarch: arm64
pkg: github.com/bwesterb/go-and
│ naive │ purego │ asm │
│ sec/op │ sec/op vs base │ sec/op vs base │
And-12 354.88µ ± 1% 84.98µ ± 1% -76.05% (p=0.000 n=10) 26.38µ ± 1% -92.57% (p=0.000 n=10)
Or-12 357.74µ ± 2% 84.90µ ± 2% -76.27% (p=0.000 n=10) 26.23µ ± 1% -92.67% (p=0.000 n=10)
Xor-12 365.42µ ± 3% 85.10µ ± 1% -76.71% (p=0.000 n=10) 26.38µ ± 1% -92.78% (p=0.000 n=10)
AndNot-12 358.92µ ± 1% 85.65µ ± 4% -76.14% (p=0.000 n=10) 26.47µ ± 0% -92.63% (p=0.000 n=10)
Memset-12 297.70µ ± 1% 80.65µ ± 1% -72.91% (p=0.000 n=10) 12.27µ ± 12% -95.88% (p=0.000 n=10)
Popcnt-12 293.81µ ± 1% 45.94µ ± 1% -84.36% (p=0.000 n=10) 11.42µ ± 1% -96.11% (p=0.000 n=10)
geomean 336.7µ 76.14µ -77.38% 20.19µ -94.00%
│ naive │ purego │ asm │
│ B/s │ B/s vs base │ B/s vs base │
And-12 2.624Gi ± 1% 10.959Gi ± 1% +317.58% (p=0.000 n=10) 35.305Gi ± 1% +1245.28% (p=0.000 n=10)
Or-12 2.603Gi ± 2% 10.970Gi ± 2% +321.35% (p=0.000 n=10) 35.502Gi ± 1% +1263.65% (p=0.000 n=10)
Xor-12 2.549Gi ± 3% 10.944Gi ± 1% +329.42% (p=0.000 n=10) 35.309Gi ± 1% +1285.41% (p=0.000 n=10)
AndNot-12 2.595Gi ± 1% 10.873Gi ± 4% +319.04% (p=0.000 n=10) 35.183Gi ± 0% +1255.91% (p=0.000 n=10)
Memset-12 3.128Gi ± 1% 11.548Gi ± 1% +269.12% (p=0.000 n=10) 75.993Gi ± 13% +2329.13% (p=0.000 n=10)
Popcnt-12 3.170Gi ± 1% 20.271Gi ± 1% +539.48% (p=0.000 n=10) 81.560Gi ± 1% +2472.98% (p=0.000 n=10)
geomean 2.766Gi 12.23Gi +342.17% 46.14Gi +1568.02%
```

0 comments on commit fd4bd90

Please sign in to comment.