Skip to content

Commit

Permalink
Add benchmark results in README (lestrrat-go#441)
Browse files Browse the repository at this point in the history
  • Loading branch information
lestrrat authored Aug 18, 2021
1 parent 2308e69 commit 2ded52a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
6 changes: 2 additions & 4 deletions bench/comparison/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
stdlib:
go test -bench . -benchmem -count 5 -timeout 60m | tee stdlib.txt
go test -bench . -benchmem | tee stdlib.txt

goccy:
go test -bench . -benchmem -count 5 -timeout 60m -tags jwx_goccy | tee goccy.txt
go test -bench . -benchmem -tags jwx_goccy | tee goccy.txt

benchstat:
benchstat -sort -delta stdlib.txt goccy.txt
16 changes: 16 additions & 0 deletions bench/comparison/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Comparison Benchmarks

## Parsing signed JWT

* github.com/lestrrat-go/jwx
* github.com/golang-jwt/jwt

```
go test -bench . -benchmem -tags jwx_goccy | tee goccy.txt
goos: linux
goarch: amd64
pkg: github.com/lestrrat-go/jwx/bench/comparison
cpu: AMD Ryzen 9 3900X 12-Core Processor
BenchmarkJWT/github.com/lestrrat-go/jwx-24 100 10606620 ns/op 6094200 B/op 39411 allocs/op
BenchmarkJWT/github.com/golang-jwt/jwt-24 100 10577532 ns/op 6080878 B/op 39366 allocs/op
```

0 comments on commit 2ded52a

Please sign in to comment.