diff --git a/bencode/bencode_marshal_test.go b/bencode/bencode_marshal_test.go index 3665d8a..a4bd4d5 100644 --- a/bencode/bencode_marshal_test.go +++ b/bencode/bencode_marshal_test.go @@ -4,21 +4,21 @@ import ( "bytes" "testing" - bencode2 "github.com/IncSW/go-bencode" - bencode8 "github.com/anacrolix/torrent/bencode" - bencode7 "github.com/chihaya/chihaya/frontend/http/bencode" - bencode1 "github.com/cristalhq/bencode" - bencode16 "github.com/cuberat/go-bencode" - bencode11 "github.com/ehmry/go-bencode" - bencode6 "github.com/jackpal/bencode-go" - bencode15 "github.com/lajide/bencode" - bencode13 "github.com/lwch/bencode" - bencode5 "github.com/marksamman/bencode" - bencode4 "github.com/nabilanam/bencode/encoder" - bencode9 "github.com/owenliang/dht" - bencode12 "github.com/stints/bencode" - bencode10 "github.com/tumdum/bencoding" - bencode3 "github.com/zeebo/bencode" + IncSW "github.com/IncSW/go-bencode" + anacrolix "github.com/anacrolix/torrent/bencode" + chihaya "github.com/chihaya/chihaya/frontend/http/bencode" + cristalhq "github.com/cristalhq/bencode" + cuberat "github.com/cuberat/go-bencode" + ehmry "github.com/ehmry/go-bencode" + jackpal "github.com/jackpal/bencode-go" + lajide "github.com/lajide/bencode" + lwch "github.com/lwch/bencode" + marksamman "github.com/marksamman/bencode" + nabilanam "github.com/nabilanam/bencode/encoder" + owenliang "github.com/owenliang/dht" + stints "github.com/stints/bencode" + tumdum "github.com/tumdum/bencoding" + zeebo "github.com/zeebo/bencode" ) var marshalBenchData = map[string]interface{}{ @@ -42,7 +42,7 @@ var marshalBenchData = map[string]interface{}{ func Benchmark_cristalhq_Marshal(b *testing.B) { b.ReportAllocs() for n := 0; n < b.N; n++ { - _, err := bencode1.Marshal(marshalBenchData) + _, err := cristalhq.Marshal(marshalBenchData) if err != nil { b.Fatal(err) } @@ -53,7 +53,7 @@ func Benchmark_cristalhq_MarshalTo(b *testing.B) { dst := make([]byte, 0, 1<<12) b.ReportAllocs() for n := 0; n < b.N; n++ { - _, err := bencode1.MarshalTo(dst, marshalBenchData) + _, err := cristalhq.MarshalTo(dst, marshalBenchData) if err != nil { b.Fatal(err) } @@ -63,7 +63,7 @@ func Benchmark_cristalhq_MarshalTo(b *testing.B) { func Benchmark_IncSW_Marshal(b *testing.B) { b.ReportAllocs() for n := 0; n < b.N; n++ { - _, err := bencode2.Marshal(marshalBenchData) + _, err := IncSW.Marshal(marshalBenchData) if err != nil { b.Fatal(err) } @@ -74,7 +74,7 @@ func Benchmark_IncSW_MarshalTo(b *testing.B) { dst := make([]byte, 0, 1<<12) b.ReportAllocs() for n := 0; n < b.N; n++ { - _, err := bencode2.MarshalTo(dst, marshalBenchData) + _, err := IncSW.MarshalTo(dst, marshalBenchData) if err != nil { b.Fatal(err) } @@ -84,7 +84,7 @@ func Benchmark_IncSW_MarshalTo(b *testing.B) { func Benchmark_Zeebo_Marshal(b *testing.B) { b.ReportAllocs() for n := 0; n < b.N; n++ { - _, err := bencode3.EncodeBytes(marshalBenchData) + _, err := zeebo.EncodeBytes(marshalBenchData) if err != nil { b.Fatal(err) } @@ -94,7 +94,7 @@ func Benchmark_Zeebo_Marshal(b *testing.B) { func Benchmark_Marksamman_Marshal(b *testing.B) { b.ReportAllocs() for n := 0; n < b.N; n++ { - err := bencode5.Encode(marshalBenchData) + err := marksamman.Encode(marshalBenchData) if err == nil { b.Fatal("got nil") } @@ -105,7 +105,7 @@ func Benchmark_Anacrolix_Marshal(b *testing.B) { w := bytes.NewBuffer(make([]byte, 0, 1<<12)) b.ReportAllocs() for n := 0; n < b.N; n++ { - err := bencode8.NewEncoder(w).Encode(marshalBenchData) + err := anacrolix.NewEncoder(w).Encode(marshalBenchData) if err != nil { b.Fatal(err) } @@ -116,7 +116,7 @@ func Benchmark_Nabilanam_Marshal(b *testing.B) { b.Skip() b.ReportAllocs() for n := 0; n < b.N; n++ { - res := bencode4.New(marshalBenchData).Encode() + res := nabilanam.New(marshalBenchData).Encode() if res != "" && b.N%3 == 66666 { b.Fatal("empty") } @@ -128,7 +128,7 @@ func Benchmark_Jackpal_Marshal(b *testing.B) { w := bytes.NewBuffer(make([]byte, 0, 1<<12)) b.ReportAllocs() for n := 0; n < b.N; n++ { - err := bencode6.Marshal(w, marshalBenchData) + err := jackpal.Marshal(w, marshalBenchData) if err != nil { b.Fatal(err) } @@ -140,7 +140,7 @@ func Benchmark_Chihaya_Marshal(b *testing.B) { w := bytes.NewBuffer(make([]byte, 0, 1<<12)) b.ReportAllocs() for n := 0; n < b.N; n++ { - err := bencode7.NewEncoder(w).Encode(marshalBenchData) + err := chihaya.NewEncoder(w).Encode(marshalBenchData) if err != nil { b.Fatal(err) } @@ -151,7 +151,7 @@ func Benchmark_Owenliang_Marshal(b *testing.B) { b.Skip() b.ReportAllocs() for n := 0; n < b.N; n++ { - _, err := bencode9.Encode(marshalBenchData) + _, err := owenliang.Encode(marshalBenchData) if err != nil { b.Fatal(err) } @@ -163,7 +163,7 @@ func Benchmark_Tumdum_Marshal(b *testing.B) { w := bytes.NewBuffer(make([]byte, 0, 1<<12)) b.ReportAllocs() for n := 0; n < b.N; n++ { - err := bencode10.NewEncoder(w).Encode(marshalBenchData) + err := tumdum.NewEncoder(w).Encode(marshalBenchData) if err != nil { b.Fatal(err) } @@ -175,7 +175,7 @@ func Benchmark_Ehmry_Marshal(b *testing.B) { w := bytes.NewBuffer(make([]byte, 0, 1<<12)) b.ReportAllocs() for n := 0; n < b.N; n++ { - err := bencode11.NewEncoder(w).Encode(marshalBenchData) + err := ehmry.NewEncoder(w).Encode(marshalBenchData) if err != nil { b.Fatal(err) } @@ -186,7 +186,7 @@ func Benchmark_Stints_Marshal(b *testing.B) { b.Skip() b.ReportAllocs() for n := 0; n < b.N; n++ { - d := bencode12.NewEncoder().Encode(marshalBenchData) + d := stints.NewEncoder().Encode(marshalBenchData) if d == nil { b.Fatal("is nil") } @@ -198,7 +198,7 @@ func Benchmark_Lwch_Marshal(b *testing.B) { w := bytes.NewBuffer(make([]byte, 0, 1<<12)) b.ReportAllocs() for n := 0; n < b.N; n++ { - err := bencode13.NewEncoder(w).Encode(marshalBenchData) + err := lwch.NewEncoder(w).Encode(marshalBenchData) if err != nil { b.Fatal(err) } @@ -210,7 +210,7 @@ func Benchmark_Lajide_Marshal(b *testing.B) { buf := bytes.NewBuffer(make([]byte, 0, 1<<12)) b.ReportAllocs() for n := 0; n < b.N; n++ { - err := bencode15.NewEncoder(buf).Encode(marshalBenchData) + err := lajide.NewEncoder(buf).Encode(marshalBenchData) if err != nil { b.Fatal(err) } @@ -222,7 +222,7 @@ func Benchmark_Cuberat_Marshal(b *testing.B) { buf := bytes.NewBuffer(make([]byte, 0, 1<<12)) b.ReportAllocs() for n := 0; n < b.N; n++ { - err := bencode16.NewEncoder(buf).Encode(marshalBenchData) + err := cuberat.NewEncoder(buf).Encode(marshalBenchData) if err != nil { b.Fatal(err) } diff --git a/bencode/bencode_unmarshal_test.go b/bencode/bencode_unmarshal_test.go index 53c3057..2bad0e8 100644 --- a/bencode/bencode_unmarshal_test.go +++ b/bencode/bencode_unmarshal_test.go @@ -5,20 +5,20 @@ import ( "io" "testing" - bencode2 "github.com/IncSW/go-bencode" - bencode8 "github.com/anacrolix/torrent/bencode" - bencode7 "github.com/chihaya/chihaya/frontend/http/bencode" - bencode1 "github.com/cristalhq/bencode" - bencode16 "github.com/cuberat/go-bencode" - bencode11 "github.com/ehmry/go-bencode" - bencode6 "github.com/jackpal/bencode-go" - bencode15 "github.com/lajide/bencode" - bencode13 "github.com/lwch/bencode" - bencode5 "github.com/marksamman/bencode" - bencode4 "github.com/nabilanam/bencode/decoder" - bencode9 "github.com/owenliang/dht" - bencode10 "github.com/tumdum/bencoding" - bencode3 "github.com/zeebo/bencode" + IncSW "github.com/IncSW/go-bencode" + anacrolix "github.com/anacrolix/torrent/bencode" + chihaya "github.com/chihaya/chihaya/frontend/http/bencode" + cristalhq "github.com/cristalhq/bencode" + cuberat "github.com/cuberat/go-bencode" + ehmry "github.com/ehmry/go-bencode" + jackpal "github.com/jackpal/bencode-go" + lajide "github.com/lajide/bencode" + lwch "github.com/lwch/bencode" + marksamman "github.com/marksamman/bencode" + nabilanam "github.com/nabilanam/bencode/decoder" + owenliang "github.com/owenliang/dht" + tumdum "github.com/tumdum/bencoding" + zeebo "github.com/zeebo/bencode" ) var unmarshalBenchData = []byte("d4:infod6:lengthi170917888e12:piece lengthi262144e4:name30:debian-8.8.0-arm64-netinst.isoe8:announce38:udp://tracker.publicbt.com:80/announce13:announce-listll38:udp://tracker.publicbt.com:80/announceel44:udp://tracker.openbittorrent.com:80/announceee7:comment33:Debian CD from cdimage.debian.orge") @@ -27,7 +27,7 @@ func Benchmark_cristalhq_Unmarshal(b *testing.B) { var res interface{} b.ReportAllocs() for n := 0; n < b.N; n++ { - err := bencode1.NewDecodeBytes(unmarshalBenchData).Decode(&res) + err := cristalhq.NewDecodeBytes(unmarshalBenchData).Decode(&res) if err != nil { b.Fatal(err) } @@ -42,7 +42,7 @@ func Benchmark_cristalhq_UnmarshalReader(b *testing.B) { b.ReportAllocs() for n := 0; n < b.N; n++ { r := bytes.NewReader(unmarshalBenchData) - err := bencode1.NewDecoder(r).Decode(&res) + err := cristalhq.NewDecoder(r).Decode(&res) if err != nil { b.Fatal(err) } @@ -55,7 +55,7 @@ func Benchmark_cristalhq_UnmarshalReader(b *testing.B) { func Benchmark_IncSW_Unmarshal(b *testing.B) { b.ReportAllocs() for n := 0; n < b.N; n++ { - _, err := bencode2.Unmarshal(unmarshalBenchData) + _, err := IncSW.Unmarshal(unmarshalBenchData) if err != nil { b.Fatal(err) } @@ -66,7 +66,7 @@ func Benchmark_ZeeboBencode_Unmarshal(b *testing.B) { res := map[string]interface{}{} b.ReportAllocs() for n := 0; n < b.N; n++ { - err := bencode3.DecodeBytes(unmarshalBenchData, &res) + err := zeebo.DecodeBytes(unmarshalBenchData, &res) if err != nil { b.Fatal(err) } @@ -79,7 +79,7 @@ func Benchmark_ZeeboBencode_Unmarshal(b *testing.B) { func Benchmark_NabilanamBencode_Unmarshal(b *testing.B) { b.ReportAllocs() for n := 0; n < b.N; n++ { - res := bencode4.New(unmarshalBenchData).Decode() + res := nabilanam.New(unmarshalBenchData).Decode() if res == nil { b.Fatal("is nil") } @@ -90,7 +90,7 @@ func Benchmark_MarksammanBencode_Unmarshal(b *testing.B) { b.ReportAllocs() for n := 0; n < b.N; n++ { r := bytes.NewReader(unmarshalBenchData) - _, err := bencode5.Decode(r) + _, err := marksamman.Decode(r) if err != nil { b.Fatal(err) } @@ -102,7 +102,7 @@ func Benchmark_JackpalBencode_Unmarshal(b *testing.B) { b.ReportAllocs() for n := 0; n < b.N; n++ { r := bytes.NewReader(unmarshalBenchData) - _, err := bencode6.Decode(r) + _, err := jackpal.Decode(r) if err != nil && err != io.EOF { b.Fatal(err) } @@ -113,7 +113,7 @@ func Benchmark_ChihayaBencode_Unmarshal(b *testing.B) { b.Skip() b.ReportAllocs() for n := 0; n < b.N; n++ { - bencode7.Unmarshal(unmarshalBenchData) + chihaya.Unmarshal(unmarshalBenchData) } } @@ -122,7 +122,7 @@ func Benchmark_AnacrolixTorrent_Unmarshal(b *testing.B) { res := map[string]interface{}{} b.ReportAllocs() for n := 0; n < b.N; n++ { - err := bencode8.Unmarshal(unmarshalBenchData, &res) + err := anacrolix.Unmarshal(unmarshalBenchData, &res) if err != nil { b.Fatal(err) } @@ -135,7 +135,7 @@ func Benchmark_AnacrolixTorrent_Unmarshal(b *testing.B) { func Benchmark_OwenliangDht_Unmarshal(b *testing.B) { b.ReportAllocs() for n := 0; n < b.N; n++ { - res, err := bencode9.Decode(unmarshalBenchData) + res, err := owenliang.Decode(unmarshalBenchData) if err != nil { b.Fatal(err) } @@ -150,7 +150,7 @@ func Benchmark_TumdumBencoding_Unmarshal(b *testing.B) { res := map[string]interface{}{} b.ReportAllocs() for n := 0; n < b.N; n++ { - err := bencode10.Unmarshal(unmarshalBenchData, &res) + err := tumdum.Unmarshal(unmarshalBenchData, &res) if err != nil { b.Fatal(err) } @@ -165,7 +165,7 @@ func Benchmark_EhmryGoBencode_Unmarshal(b *testing.B) { res := map[string]interface{}{} b.ReportAllocs() for n := 0; n < b.N; n++ { - err := bencode11.Unmarshal(unmarshalBenchData, &res) + err := ehmry.Unmarshal(unmarshalBenchData, &res) if err != nil { b.Fatal(err) } @@ -184,7 +184,7 @@ func Benchmark_LwchBencode_Unmarshal(b *testing.B) { res := map[string]interface{}{} b.ReportAllocs() for n := 0; n < b.N; n++ { - err := bencode13.Decode(unmarshalBenchData, &res) + err := lwch.Decode(unmarshalBenchData, &res) if err != nil { b.Fatal(err) } @@ -203,7 +203,7 @@ func Benchmark_LajideBencode_Unmarshal(b *testing.B) { b.ReportAllocs() for n := 0; n < b.N; n++ { buf := bytes.NewBuffer(unmarshalBenchData) - res, err := bencode15.NewDecoder(buf).Decode() + res, err := lajide.NewDecoder(buf).Decode() if err != nil && err != io.EOF { b.Fatal(err) } @@ -218,7 +218,7 @@ func Benchmark_CuberatGoBencode_Unmarshal(b *testing.B) { b.ReportAllocs() for n := 0; n < b.N; n++ { buf := bytes.NewBuffer(unmarshalBenchData) - res, err := bencode16.NewDecoder(buf).Decode() + res, err := cuberat.NewDecoder(buf).Decode() if err != nil && err != io.EOF { b.Fatal(err) } diff --git a/jwt/bench.txt b/jwt/bench.txt index ac3a06a..a7c0b3f 100644 --- a/jwt/bench.txt +++ b/jwt/bench.txt @@ -1,369 +1,369 @@ goos: darwin goarch: arm64 pkg: github.com/cristaloleg/benches/jwt -Benchmark_cristalhq_jwt_EdDSA -Benchmark_cristalhq_jwt_EdDSA/sign-EdDSA -Benchmark_cristalhq_jwt_EdDSA/sign-EdDSA-10 48038 24601 ns/op 172.0 B/token 480 B/op 6 allocs/op -Benchmark_cristalhq_jwt_EdDSA/sign-EdDSA-10 48878 24576 ns/op 172.0 B/token 480 B/op 6 allocs/op -Benchmark_cristalhq_jwt_EdDSA/sign-EdDSA-10 48878 24644 ns/op 172.0 B/token 480 B/op 6 allocs/op -Benchmark_cristalhq_jwt_EdDSA/sign-EdDSA-10 48692 24599 ns/op 172.0 B/token 480 B/op 6 allocs/op -Benchmark_cristalhq_jwt_EdDSA/sign-EdDSA-10 48694 24541 ns/op 172.0 B/token 480 B/op 6 allocs/op -Benchmark_cristalhq_jwt_EdDSA/check-EdDSA -Benchmark_cristalhq_jwt_EdDSA/check-EdDSA-10 23143 51990 ns/op 0 B/op 0 allocs/op -Benchmark_cristalhq_jwt_EdDSA/check-EdDSA-10 23143 51840 ns/op 0 B/op 0 allocs/op -Benchmark_cristalhq_jwt_EdDSA/check-EdDSA-10 23125 51857 ns/op 0 B/op 0 allocs/op -Benchmark_cristalhq_jwt_EdDSA/check-EdDSA-10 23136 51951 ns/op 0 B/op 0 allocs/op -Benchmark_cristalhq_jwt_EdDSA/check-EdDSA-10 23149 51848 ns/op 0 B/op 0 allocs/op -Benchmark_cristalhq_jwt_HMAC -Benchmark_cristalhq_jwt_HMAC/sign-HS256 -Benchmark_cristalhq_jwt_HMAC/sign-HS256-10 1687972 711.4 ns/op 129.0 B/token 416 B/op 6 allocs/op -Benchmark_cristalhq_jwt_HMAC/sign-HS256-10 1685468 712.2 ns/op 129.0 B/token 416 B/op 6 allocs/op -Benchmark_cristalhq_jwt_HMAC/sign-HS256-10 1684227 714.1 ns/op 129.0 B/token 416 B/op 6 allocs/op -Benchmark_cristalhq_jwt_HMAC/sign-HS256-10 1688468 709.2 ns/op 129.0 B/token 416 B/op 6 allocs/op -Benchmark_cristalhq_jwt_HMAC/sign-HS256-10 1689355 711.6 ns/op 129.0 B/token 416 B/op 6 allocs/op -Benchmark_cristalhq_jwt_HMAC/sign-HS384 -Benchmark_cristalhq_jwt_HMAC/sign-HS384-10 725773 1620 ns/op 150.0 B/token 448 B/op 6 allocs/op -Benchmark_cristalhq_jwt_HMAC/sign-HS384-10 728716 1623 ns/op 150.0 B/token 448 B/op 6 allocs/op -Benchmark_cristalhq_jwt_HMAC/sign-HS384-10 730410 1621 ns/op 150.0 B/token 448 B/op 6 allocs/op -Benchmark_cristalhq_jwt_HMAC/sign-HS384-10 726630 1620 ns/op 150.0 B/token 448 B/op 6 allocs/op -Benchmark_cristalhq_jwt_HMAC/sign-HS384-10 725888 1621 ns/op 150.0 B/token 448 B/op 6 allocs/op -Benchmark_cristalhq_jwt_HMAC/sign-HS512 -Benchmark_cristalhq_jwt_HMAC/sign-HS512-10 724214 1637 ns/op 172.0 B/token 480 B/op 6 allocs/op -Benchmark_cristalhq_jwt_HMAC/sign-HS512-10 722506 1640 ns/op 172.0 B/token 480 B/op 6 allocs/op -Benchmark_cristalhq_jwt_HMAC/sign-HS512-10 693190 1639 ns/op 172.0 B/token 480 B/op 6 allocs/op -Benchmark_cristalhq_jwt_HMAC/sign-HS512-10 719536 1640 ns/op 172.0 B/token 480 B/op 6 allocs/op -Benchmark_cristalhq_jwt_HMAC/sign-HS512-10 728365 1638 ns/op 172.0 B/token 480 B/op 6 allocs/op -Benchmark_cristalhq_jwt_HMAC/check-HS256 -Benchmark_cristalhq_jwt_HMAC/check-HS256-10 3826406 313.9 ns/op 32 B/op 1 allocs/op -Benchmark_cristalhq_jwt_HMAC/check-HS256-10 3827530 313.5 ns/op 32 B/op 1 allocs/op -Benchmark_cristalhq_jwt_HMAC/check-HS256-10 3819402 313.7 ns/op 32 B/op 1 allocs/op -Benchmark_cristalhq_jwt_HMAC/check-HS256-10 3819306 313.8 ns/op 32 B/op 1 allocs/op -Benchmark_cristalhq_jwt_HMAC/check-HS256-10 3824636 314.0 ns/op 32 B/op 1 allocs/op -Benchmark_cristalhq_jwt_HMAC/check-HS384 -Benchmark_cristalhq_jwt_HMAC/check-HS384-10 983746 1206 ns/op 48 B/op 1 allocs/op -Benchmark_cristalhq_jwt_HMAC/check-HS384-10 988362 1207 ns/op 48 B/op 1 allocs/op -Benchmark_cristalhq_jwt_HMAC/check-HS384-10 992890 1205 ns/op 48 B/op 1 allocs/op -Benchmark_cristalhq_jwt_HMAC/check-HS384-10 988776 1205 ns/op 48 B/op 1 allocs/op -Benchmark_cristalhq_jwt_HMAC/check-HS384-10 985551 1206 ns/op 48 B/op 1 allocs/op -Benchmark_cristalhq_jwt_HMAC/check-HS512 -Benchmark_cristalhq_jwt_HMAC/check-HS512-10 980251 1218 ns/op 64 B/op 1 allocs/op -Benchmark_cristalhq_jwt_HMAC/check-HS512-10 981992 1220 ns/op 64 B/op 1 allocs/op -Benchmark_cristalhq_jwt_HMAC/check-HS512-10 981384 1217 ns/op 64 B/op 1 allocs/op -Benchmark_cristalhq_jwt_HMAC/check-HS512-10 982975 1215 ns/op 64 B/op 1 allocs/op -Benchmark_cristalhq_jwt_HMAC/check-HS512-10 978519 1217 ns/op 64 B/op 1 allocs/op -Benchmark_cristalhq_jwt_RSA -Benchmark_cristalhq_jwt_RSA/sign-1024-bit -Benchmark_cristalhq_jwt_RSA/sign-1024-bit-10 5666 209658 ns/op 257.0 B/token 16822 B/op 109 allocs/op -Benchmark_cristalhq_jwt_RSA/sign-1024-bit-10 5702 210189 ns/op 257.0 B/token 16820 B/op 109 allocs/op -Benchmark_cristalhq_jwt_RSA/sign-1024-bit-10 5674 209743 ns/op 257.0 B/token 16822 B/op 109 allocs/op -Benchmark_cristalhq_jwt_RSA/sign-1024-bit-10 5674 209811 ns/op 257.0 B/token 16820 B/op 109 allocs/op -Benchmark_cristalhq_jwt_RSA/sign-1024-bit-10 5695 209625 ns/op 257.0 B/token 16822 B/op 109 allocs/op -Benchmark_cristalhq_jwt_RSA/sign-2048-bit -Benchmark_cristalhq_jwt_RSA/sign-2048-bit-10 1168 1024342 ns/op 428.0 B/token 31383 B/op 115 allocs/op -Benchmark_cristalhq_jwt_RSA/sign-2048-bit-10 1171 1024324 ns/op 428.0 B/token 31382 B/op 115 allocs/op -Benchmark_cristalhq_jwt_RSA/sign-2048-bit-10 1124 1026749 ns/op 428.0 B/token 31383 B/op 115 allocs/op -Benchmark_cristalhq_jwt_RSA/sign-2048-bit-10 1165 1023851 ns/op 428.0 B/token 31379 B/op 115 allocs/op -Benchmark_cristalhq_jwt_RSA/sign-2048-bit-10 1168 1022296 ns/op 428.0 B/token 31382 B/op 115 allocs/op -Benchmark_cristalhq_jwt_RSA/sign-4096-bit -Benchmark_cristalhq_jwt_RSA/sign-4096-bit-10 212 5633548 ns/op 769.0 B/token 77461 B/op 129 allocs/op -Benchmark_cristalhq_jwt_RSA/sign-4096-bit-10 212 5614326 ns/op 769.0 B/token 77433 B/op 129 allocs/op -Benchmark_cristalhq_jwt_RSA/sign-4096-bit-10 213 5608067 ns/op 769.0 B/token 77479 B/op 129 allocs/op -Benchmark_cristalhq_jwt_RSA/sign-4096-bit-10 213 5599901 ns/op 769.0 B/token 77439 B/op 129 allocs/op -Benchmark_cristalhq_jwt_RSA/sign-4096-bit-10 213 5604916 ns/op 769.0 B/token 77460 B/op 129 allocs/op -Benchmark_cristalhq_jwt_RSA/check-1024-bit -Benchmark_cristalhq_jwt_RSA/check-1024-bit-10 102832 11653 ns/op 2777 B/op 12 allocs/op -Benchmark_cristalhq_jwt_RSA/check-1024-bit-10 102446 11652 ns/op 2777 B/op 12 allocs/op -Benchmark_cristalhq_jwt_RSA/check-1024-bit-10 102830 11655 ns/op 2777 B/op 12 allocs/op -Benchmark_cristalhq_jwt_RSA/check-1024-bit-10 103052 11643 ns/op 2777 B/op 12 allocs/op -Benchmark_cristalhq_jwt_RSA/check-1024-bit-10 102802 11656 ns/op 2777 B/op 12 allocs/op -Benchmark_cristalhq_jwt_RSA/check-2048-bit -Benchmark_cristalhq_jwt_RSA/check-2048-bit-10 42026 28543 ns/op 5210 B/op 12 allocs/op -Benchmark_cristalhq_jwt_RSA/check-2048-bit-10 42163 28530 ns/op 5211 B/op 12 allocs/op -Benchmark_cristalhq_jwt_RSA/check-2048-bit-10 42103 28474 ns/op 5210 B/op 12 allocs/op -Benchmark_cristalhq_jwt_RSA/check-2048-bit-10 42145 28535 ns/op 5210 B/op 12 allocs/op -Benchmark_cristalhq_jwt_RSA/check-2048-bit-10 42090 28484 ns/op 5211 B/op 12 allocs/op -Benchmark_cristalhq_jwt_RSA/check-4096-bit -Benchmark_cristalhq_jwt_RSA/check-4096-bit-10 14018 85609 ns/op 14754 B/op 13 allocs/op -Benchmark_cristalhq_jwt_RSA/check-4096-bit-10 13992 85693 ns/op 14755 B/op 13 allocs/op -Benchmark_cristalhq_jwt_RSA/check-4096-bit-10 14013 85690 ns/op 14753 B/op 13 allocs/op -Benchmark_cristalhq_jwt_RSA/check-4096-bit-10 13962 85893 ns/op 14754 B/op 13 allocs/op -Benchmark_cristalhq_jwt_RSA/check-4096-bit-10 14006 86031 ns/op 14753 B/op 13 allocs/op -Benchmark_cristalhq_jwt_ECDSA -Benchmark_cristalhq_jwt_ECDSA/sign-ES256 -Benchmark_cristalhq_jwt_ECDSA/sign-ES256-10 60254 19792 ns/op 172.0 B/token 3187 B/op 41 allocs/op -Benchmark_cristalhq_jwt_ECDSA/sign-ES256-10 60559 19794 ns/op 172.0 B/token 3188 B/op 41 allocs/op -Benchmark_cristalhq_jwt_ECDSA/sign-ES256-10 60518 19774 ns/op 172.0 B/token 3188 B/op 41 allocs/op -Benchmark_cristalhq_jwt_ECDSA/sign-ES256-10 60669 19758 ns/op 172.0 B/token 3188 B/op 41 allocs/op -Benchmark_cristalhq_jwt_ECDSA/sign-ES256-10 60580 19757 ns/op 172.0 B/token 3188 B/op 41 allocs/op -Benchmark_cristalhq_jwt_ECDSA/sign-ES384 -Benchmark_cristalhq_jwt_ECDSA/sign-ES384-10 2240 535568 ns/op 214.0 B/token 6591 B/op 69 allocs/op -Benchmark_cristalhq_jwt_ECDSA/sign-ES384-10 2230 535658 ns/op 214.0 B/token 6591 B/op 69 allocs/op -Benchmark_cristalhq_jwt_ECDSA/sign-ES384-10 2235 536763 ns/op 214.0 B/token 6591 B/op 69 allocs/op -Benchmark_cristalhq_jwt_ECDSA/sign-ES384-10 2235 535557 ns/op 214.0 B/token 6592 B/op 69 allocs/op -Benchmark_cristalhq_jwt_ECDSA/sign-ES384-10 2224 535862 ns/op 214.0 B/token 6592 B/op 69 allocs/op -Benchmark_cristalhq_jwt_ECDSA/sign-ES512 -Benchmark_cristalhq_jwt_ECDSA/sign-ES512-10 748 1600164 ns/op 262.0 B/token 8308 B/op 69 allocs/op -Benchmark_cristalhq_jwt_ECDSA/sign-ES512-10 748 1601715 ns/op 262.0 B/token 8307 B/op 69 allocs/op -Benchmark_cristalhq_jwt_ECDSA/sign-ES512-10 745 1600699 ns/op 262.0 B/token 8307 B/op 69 allocs/op -Benchmark_cristalhq_jwt_ECDSA/sign-ES512-10 746 1601790 ns/op 262.0 B/token 8308 B/op 69 allocs/op -Benchmark_cristalhq_jwt_ECDSA/sign-ES512-10 746 1601936 ns/op 262.0 B/token 8307 B/op 69 allocs/op -Benchmark_cristalhq_jwt_ECDSA/check-ES256 -Benchmark_cristalhq_jwt_ECDSA/check-ES256-10 21486 55832 ns/op 1248 B/op 21 allocs/op -Benchmark_cristalhq_jwt_ECDSA/check-ES256-10 21403 55940 ns/op 1248 B/op 21 allocs/op -Benchmark_cristalhq_jwt_ECDSA/check-ES256-10 21486 55880 ns/op 1248 B/op 21 allocs/op -Benchmark_cristalhq_jwt_ECDSA/check-ES256-10 21499 55820 ns/op 1248 B/op 21 allocs/op -Benchmark_cristalhq_jwt_ECDSA/check-ES256-10 21517 55799 ns/op 1248 B/op 21 allocs/op -Benchmark_cristalhq_jwt_ECDSA/check-ES384 -Benchmark_cristalhq_jwt_ECDSA/check-ES384-10 1192 1006077 ns/op 4434 B/op 72 allocs/op -Benchmark_cristalhq_jwt_ECDSA/check-ES384-10 1191 1005289 ns/op 4434 B/op 72 allocs/op -Benchmark_cristalhq_jwt_ECDSA/check-ES384-10 1192 1005020 ns/op 4434 B/op 72 allocs/op -Benchmark_cristalhq_jwt_ECDSA/check-ES384-10 1192 1005469 ns/op 4434 B/op 72 allocs/op -Benchmark_cristalhq_jwt_ECDSA/check-ES384-10 1190 1005587 ns/op 4434 B/op 72 allocs/op -Benchmark_cristalhq_jwt_ECDSA/check-ES512 -Benchmark_cristalhq_jwt_ECDSA/check-ES512-10 385 3152044 ns/op 5844 B/op 72 allocs/op -Benchmark_cristalhq_jwt_ECDSA/check-ES512-10 375 3125700 ns/op 5844 B/op 72 allocs/op -Benchmark_cristalhq_jwt_ECDSA/check-ES512-10 384 3117594 ns/op 5844 B/op 72 allocs/op -Benchmark_cristalhq_jwt_ECDSA/check-ES512-10 384 3117390 ns/op 5843 B/op 72 allocs/op -Benchmark_cristalhq_jwt_ECDSA/check-ES512-10 384 3123422 ns/op 5843 B/op 72 allocs/op -Benchmark_pascaldekloe_jwt_EdDSA -Benchmark_pascaldekloe_jwt_EdDSA/sign-EdDSA -Benchmark_pascaldekloe_jwt_EdDSA/sign-EdDSA-10 49888 23990 ns/op 166.0 B/token 224 B/op 2 allocs/op -Benchmark_pascaldekloe_jwt_EdDSA/sign-EdDSA-10 49944 23996 ns/op 166.0 B/token 224 B/op 2 allocs/op -Benchmark_pascaldekloe_jwt_EdDSA/sign-EdDSA-10 50013 24005 ns/op 166.0 B/token 224 B/op 2 allocs/op -Benchmark_pascaldekloe_jwt_EdDSA/sign-EdDSA-10 50034 24005 ns/op 166.0 B/token 224 B/op 2 allocs/op -Benchmark_pascaldekloe_jwt_EdDSA/sign-EdDSA-10 50043 24006 ns/op 166.0 B/token 224 B/op 2 allocs/op -Benchmark_pascaldekloe_jwt_EdDSA/check-EdDSA -Benchmark_pascaldekloe_jwt_EdDSA/check-EdDSA-10 22470 53382 ns/op 1320 B/op 26 allocs/op -Benchmark_pascaldekloe_jwt_EdDSA/check-EdDSA-10 22452 53394 ns/op 1320 B/op 26 allocs/op -Benchmark_pascaldekloe_jwt_EdDSA/check-EdDSA-10 22459 53411 ns/op 1320 B/op 26 allocs/op -Benchmark_pascaldekloe_jwt_EdDSA/check-EdDSA-10 22479 53422 ns/op 1320 B/op 26 allocs/op -Benchmark_pascaldekloe_jwt_EdDSA/check-EdDSA-10 22455 53391 ns/op 1320 B/op 26 allocs/op -Benchmark_pascaldekloe_jwt_HMAC -Benchmark_pascaldekloe_jwt_HMAC/sign-HS256 -Benchmark_pascaldekloe_jwt_HMAC/sign-HS256-10 1510303 799.2 ns/op 123.0 B/token 656 B/op 7 allocs/op -Benchmark_pascaldekloe_jwt_HMAC/sign-HS256-10 1493904 801.0 ns/op 123.0 B/token 656 B/op 7 allocs/op -Benchmark_pascaldekloe_jwt_HMAC/sign-HS256-10 1500766 800.3 ns/op 123.0 B/token 656 B/op 7 allocs/op -Benchmark_pascaldekloe_jwt_HMAC/sign-HS256-10 1496866 801.5 ns/op 123.0 B/token 656 B/op 7 allocs/op -Benchmark_pascaldekloe_jwt_HMAC/sign-HS256-10 1497058 799.6 ns/op 123.0 B/token 656 B/op 7 allocs/op -Benchmark_pascaldekloe_jwt_HMAC/sign-HS384 -Benchmark_pascaldekloe_jwt_HMAC/sign-HS384-10 447494 2683 ns/op 144.0 B/token 992 B/op 7 allocs/op -Benchmark_pascaldekloe_jwt_HMAC/sign-HS384-10 445864 2672 ns/op 144.0 B/token 992 B/op 7 allocs/op -Benchmark_pascaldekloe_jwt_HMAC/sign-HS384-10 439272 2677 ns/op 144.0 B/token 992 B/op 7 allocs/op -Benchmark_pascaldekloe_jwt_HMAC/sign-HS384-10 434118 2672 ns/op 144.0 B/token 992 B/op 7 allocs/op -Benchmark_pascaldekloe_jwt_HMAC/sign-HS384-10 443274 2679 ns/op 144.0 B/token 992 B/op 7 allocs/op -Benchmark_pascaldekloe_jwt_HMAC/sign-HS512 -Benchmark_pascaldekloe_jwt_HMAC/sign-HS512-10 444696 2688 ns/op 166.0 B/token 1024 B/op 7 allocs/op -Benchmark_pascaldekloe_jwt_HMAC/sign-HS512-10 444146 2686 ns/op 166.0 B/token 1024 B/op 7 allocs/op -Benchmark_pascaldekloe_jwt_HMAC/sign-HS512-10 440916 2689 ns/op 166.0 B/token 1024 B/op 7 allocs/op -Benchmark_pascaldekloe_jwt_HMAC/sign-HS512-10 444733 2690 ns/op 166.0 B/token 1024 B/op 7 allocs/op -Benchmark_pascaldekloe_jwt_HMAC/sign-HS512-10 446044 2693 ns/op 166.0 B/token 1024 B/op 7 allocs/op -Benchmark_pascaldekloe_jwt_HMAC/check-HS256 -Benchmark_pascaldekloe_jwt_HMAC/check-HS256-10 614578 1905 ns/op 1752 B/op 31 allocs/op -Benchmark_pascaldekloe_jwt_HMAC/check-HS256-10 621232 1903 ns/op 1752 B/op 31 allocs/op -Benchmark_pascaldekloe_jwt_HMAC/check-HS256-10 635602 1912 ns/op 1752 B/op 31 allocs/op -Benchmark_pascaldekloe_jwt_HMAC/check-HS256-10 619737 1901 ns/op 1752 B/op 31 allocs/op -Benchmark_pascaldekloe_jwt_HMAC/check-HS256-10 631855 1905 ns/op 1752 B/op 31 allocs/op -Benchmark_pascaldekloe_jwt_HMAC/check-HS384 -Benchmark_pascaldekloe_jwt_HMAC/check-HS384-10 316443 3780 ns/op 2168 B/op 32 allocs/op -Benchmark_pascaldekloe_jwt_HMAC/check-HS384-10 316234 3778 ns/op 2168 B/op 32 allocs/op -Benchmark_pascaldekloe_jwt_HMAC/check-HS384-10 315879 3778 ns/op 2168 B/op 32 allocs/op -Benchmark_pascaldekloe_jwt_HMAC/check-HS384-10 319636 3786 ns/op 2168 B/op 32 allocs/op -Benchmark_pascaldekloe_jwt_HMAC/check-HS384-10 314652 3780 ns/op 2168 B/op 32 allocs/op -Benchmark_pascaldekloe_jwt_HMAC/check-HS512 -Benchmark_pascaldekloe_jwt_HMAC/check-HS512-10 313888 3799 ns/op 2216 B/op 32 allocs/op -Benchmark_pascaldekloe_jwt_HMAC/check-HS512-10 312476 3799 ns/op 2216 B/op 32 allocs/op -Benchmark_pascaldekloe_jwt_HMAC/check-HS512-10 315922 3803 ns/op 2216 B/op 32 allocs/op -Benchmark_pascaldekloe_jwt_HMAC/check-HS512-10 308049 3808 ns/op 2216 B/op 32 allocs/op -Benchmark_pascaldekloe_jwt_HMAC/check-HS512-10 312576 3807 ns/op 2216 B/op 32 allocs/op -Benchmark_pascaldekloe_jwt_RSA -Benchmark_pascaldekloe_jwt_RSA/sign-1024-bit -Benchmark_pascaldekloe_jwt_RSA/sign-1024-bit-10 5692 210238 ns/op 251.0 B/token 16543 B/op 105 allocs/op -Benchmark_pascaldekloe_jwt_RSA/sign-1024-bit-10 5742 209625 ns/op 251.0 B/token 16545 B/op 105 allocs/op -Benchmark_pascaldekloe_jwt_RSA/sign-1024-bit-10 5713 209636 ns/op 251.0 B/token 16544 B/op 105 allocs/op -Benchmark_pascaldekloe_jwt_RSA/sign-1024-bit-10 5694 209486 ns/op 251.0 B/token 16544 B/op 105 allocs/op -Benchmark_pascaldekloe_jwt_RSA/sign-1024-bit-10 5677 209629 ns/op 251.0 B/token 16544 B/op 105 allocs/op -Benchmark_pascaldekloe_jwt_RSA/sign-2048-bit -Benchmark_pascaldekloe_jwt_RSA/sign-2048-bit-10 1167 1021585 ns/op 422.0 B/token 31131 B/op 111 allocs/op -Benchmark_pascaldekloe_jwt_RSA/sign-2048-bit-10 1176 1021849 ns/op 422.0 B/token 31130 B/op 111 allocs/op -Benchmark_pascaldekloe_jwt_RSA/sign-2048-bit-10 1174 1027102 ns/op 422.0 B/token 31133 B/op 111 allocs/op -Benchmark_pascaldekloe_jwt_RSA/sign-2048-bit-10 1167 1022249 ns/op 422.0 B/token 31132 B/op 111 allocs/op -Benchmark_pascaldekloe_jwt_RSA/sign-2048-bit-10 1174 1021065 ns/op 422.0 B/token 31132 B/op 111 allocs/op -Benchmark_pascaldekloe_jwt_RSA/sign-4096-bit -Benchmark_pascaldekloe_jwt_RSA/sign-4096-bit-10 213 5610722 ns/op 763.0 B/token 77066 B/op 125 allocs/op -Benchmark_pascaldekloe_jwt_RSA/sign-4096-bit-10 213 5609565 ns/op 763.0 B/token 77064 B/op 125 allocs/op -Benchmark_pascaldekloe_jwt_RSA/sign-4096-bit-10 213 5611519 ns/op 763.0 B/token 77086 B/op 125 allocs/op -Benchmark_pascaldekloe_jwt_RSA/sign-4096-bit-10 213 5608090 ns/op 763.0 B/token 77081 B/op 125 allocs/op -Benchmark_pascaldekloe_jwt_RSA/sign-4096-bit-10 213 5609843 ns/op 763.0 B/token 77064 B/op 125 allocs/op -Benchmark_pascaldekloe_jwt_RSA/check-1024-bit -Benchmark_pascaldekloe_jwt_RSA/check-1024-bit-10 90940 13158 ns/op 4138 B/op 37 allocs/op -Benchmark_pascaldekloe_jwt_RSA/check-1024-bit-10 91090 13146 ns/op 4138 B/op 37 allocs/op -Benchmark_pascaldekloe_jwt_RSA/check-1024-bit-10 90820 13161 ns/op 4138 B/op 37 allocs/op -Benchmark_pascaldekloe_jwt_RSA/check-1024-bit-10 91384 13154 ns/op 4138 B/op 37 allocs/op -Benchmark_pascaldekloe_jwt_RSA/check-1024-bit-10 91460 13138 ns/op 4138 B/op 37 allocs/op -Benchmark_pascaldekloe_jwt_RSA/check-2048-bit -Benchmark_pascaldekloe_jwt_RSA/check-2048-bit-10 40386 29648 ns/op 6763 B/op 37 allocs/op -Benchmark_pascaldekloe_jwt_RSA/check-2048-bit-10 40392 29723 ns/op 6764 B/op 37 allocs/op -Benchmark_pascaldekloe_jwt_RSA/check-2048-bit-10 40418 29667 ns/op 6764 B/op 37 allocs/op -Benchmark_pascaldekloe_jwt_RSA/check-2048-bit-10 40459 29658 ns/op 6764 B/op 37 allocs/op -Benchmark_pascaldekloe_jwt_RSA/check-2048-bit-10 40522 29623 ns/op 6764 B/op 37 allocs/op -Benchmark_pascaldekloe_jwt_RSA/check-4096-bit -Benchmark_pascaldekloe_jwt_RSA/check-4096-bit-10 13657 87844 ns/op 16629 B/op 38 allocs/op -Benchmark_pascaldekloe_jwt_RSA/check-4096-bit-10 13681 87948 ns/op 16631 B/op 38 allocs/op -Benchmark_pascaldekloe_jwt_RSA/check-4096-bit-10 13652 87778 ns/op 16629 B/op 38 allocs/op -Benchmark_pascaldekloe_jwt_RSA/check-4096-bit-10 13653 87939 ns/op 16630 B/op 38 allocs/op -Benchmark_pascaldekloe_jwt_RSA/check-4096-bit-10 13664 87823 ns/op 16628 B/op 38 allocs/op -Benchmark_pascaldekloe_jwt_ECDSA -Benchmark_pascaldekloe_jwt_ECDSA/sign-ES256 -Benchmark_pascaldekloe_jwt_ECDSA/sign-ES256-10 60277 19603 ns/op 166.0 B/token 2835 B/op 34 allocs/op -Benchmark_pascaldekloe_jwt_ECDSA/sign-ES256-10 60956 19623 ns/op 166.0 B/token 2835 B/op 34 allocs/op -Benchmark_pascaldekloe_jwt_ECDSA/sign-ES256-10 61306 19601 ns/op 166.0 B/token 2835 B/op 34 allocs/op -Benchmark_pascaldekloe_jwt_ECDSA/sign-ES256-10 61209 19603 ns/op 166.0 B/token 2835 B/op 34 allocs/op -Benchmark_pascaldekloe_jwt_ECDSA/sign-ES256-10 61102 19597 ns/op 166.0 B/token 2835 B/op 34 allocs/op -Benchmark_pascaldekloe_jwt_ECDSA/sign-ES384 -Benchmark_pascaldekloe_jwt_ECDSA/sign-ES384-10 2238 536110 ns/op 208.0 B/token 6145 B/op 62 allocs/op -Benchmark_pascaldekloe_jwt_ECDSA/sign-ES384-10 2236 536136 ns/op 208.0 B/token 6145 B/op 62 allocs/op -Benchmark_pascaldekloe_jwt_ECDSA/sign-ES384-10 2238 536494 ns/op 208.0 B/token 6145 B/op 62 allocs/op -Benchmark_pascaldekloe_jwt_ECDSA/sign-ES384-10 2236 535921 ns/op 208.0 B/token 6145 B/op 62 allocs/op -Benchmark_pascaldekloe_jwt_ECDSA/sign-ES384-10 2236 536471 ns/op 208.0 B/token 6145 B/op 62 allocs/op -Benchmark_pascaldekloe_jwt_ECDSA/sign-ES512 -Benchmark_pascaldekloe_jwt_ECDSA/sign-ES512-10 750 1602887 ns/op 256.0 B/token 7716 B/op 62 allocs/op -Benchmark_pascaldekloe_jwt_ECDSA/sign-ES512-10 748 1602064 ns/op 256.0 B/token 7716 B/op 62 allocs/op -Benchmark_pascaldekloe_jwt_ECDSA/sign-ES512-10 748 1600806 ns/op 256.0 B/token 7716 B/op 62 allocs/op -Benchmark_pascaldekloe_jwt_ECDSA/sign-ES512-10 750 1602336 ns/op 256.0 B/token 7715 B/op 62 allocs/op -Benchmark_pascaldekloe_jwt_ECDSA/sign-ES512-10 748 1601573 ns/op 256.0 B/token 7715 B/op 62 allocs/op -Benchmark_pascaldekloe_jwt_ECDSA/check-ES256 -Benchmark_pascaldekloe_jwt_ECDSA/check-ES256-10 20866 57413 ns/op 2537 B/op 46 allocs/op -Benchmark_pascaldekloe_jwt_ECDSA/check-ES256-10 20901 57395 ns/op 2537 B/op 46 allocs/op -Benchmark_pascaldekloe_jwt_ECDSA/check-ES256-10 20896 57373 ns/op 2537 B/op 46 allocs/op -Benchmark_pascaldekloe_jwt_ECDSA/check-ES256-10 20887 57442 ns/op 2537 B/op 46 allocs/op -Benchmark_pascaldekloe_jwt_ECDSA/check-ES256-10 20892 57363 ns/op 2537 B/op 46 allocs/op -Benchmark_pascaldekloe_jwt_ECDSA/check-ES384 -Benchmark_pascaldekloe_jwt_ECDSA/check-ES384-10 1190 1008136 ns/op 5642 B/op 96 allocs/op -Benchmark_pascaldekloe_jwt_ECDSA/check-ES384-10 1191 1008285 ns/op 5642 B/op 96 allocs/op -Benchmark_pascaldekloe_jwt_ECDSA/check-ES384-10 1183 1007909 ns/op 5642 B/op 96 allocs/op -Benchmark_pascaldekloe_jwt_ECDSA/check-ES384-10 1189 1008161 ns/op 5643 B/op 96 allocs/op -Benchmark_pascaldekloe_jwt_ECDSA/check-ES384-10 1190 1007879 ns/op 5642 B/op 96 allocs/op -Benchmark_pascaldekloe_jwt_ECDSA/check-ES512 -Benchmark_pascaldekloe_jwt_ECDSA/check-ES512-10 386 3097249 ns/op 7180 B/op 97 allocs/op -Benchmark_pascaldekloe_jwt_ECDSA/check-ES512-10 386 3097214 ns/op 7180 B/op 97 allocs/op -Benchmark_pascaldekloe_jwt_ECDSA/check-ES512-10 386 3098215 ns/op 7180 B/op 97 allocs/op -Benchmark_pascaldekloe_jwt_ECDSA/check-ES512-10 386 3097509 ns/op 7180 B/op 97 allocs/op -Benchmark_pascaldekloe_jwt_ECDSA/check-ES512-10 386 3096805 ns/op 7180 B/op 97 allocs/op -Benchmark_golang_jwt_jwt_EdDSA -Benchmark_golang_jwt_jwt_EdDSA-10 1000000000 0.0000001 ns/op 0 B/op 0 allocs/op -Benchmark_golang_jwt_jwt_EdDSA-10 1000000000 0.0000000 ns/op 0 B/op 0 allocs/op -Benchmark_golang_jwt_jwt_EdDSA-10 1000000000 0.0000000 ns/op 0 B/op 0 allocs/op -Benchmark_golang_jwt_jwt_EdDSA-10 1000000000 0.0000000 ns/op 0 B/op 0 allocs/op -Benchmark_golang_jwt_jwt_EdDSA-10 1000000000 0 B/op 0 allocs/op -Benchmark_golang_jwt_jwt_HMAC -Benchmark_golang_jwt_jwt_HMAC/sign-HS256 -Benchmark_golang_jwt_jwt_HMAC/sign-HS256-10 781130 1482 ns/op 129.0 B/token 1696 B/op 27 allocs/op -Benchmark_golang_jwt_jwt_HMAC/sign-HS256-10 798369 1476 ns/op 129.0 B/token 1696 B/op 27 allocs/op -Benchmark_golang_jwt_jwt_HMAC/sign-HS256-10 810096 1478 ns/op 129.0 B/token 1696 B/op 27 allocs/op -Benchmark_golang_jwt_jwt_HMAC/sign-HS256-10 802693 1476 ns/op 129.0 B/token 1696 B/op 27 allocs/op -Benchmark_golang_jwt_jwt_HMAC/sign-HS256-10 810577 1470 ns/op 129.0 B/token 1696 B/op 27 allocs/op -Benchmark_golang_jwt_jwt_HMAC/sign-HS384 -Benchmark_golang_jwt_jwt_HMAC/sign-HS384-10 362635 3333 ns/op 150.0 B/token 2080 B/op 27 allocs/op -Benchmark_golang_jwt_jwt_HMAC/sign-HS384-10 360958 3330 ns/op 150.0 B/token 2080 B/op 27 allocs/op -Benchmark_golang_jwt_jwt_HMAC/sign-HS384-10 358340 3336 ns/op 150.0 B/token 2080 B/op 27 allocs/op -Benchmark_golang_jwt_jwt_HMAC/sign-HS384-10 354702 3337 ns/op 150.0 B/token 2080 B/op 27 allocs/op -Benchmark_golang_jwt_jwt_HMAC/sign-HS384-10 358450 3347 ns/op 150.0 B/token 2080 B/op 27 allocs/op -Benchmark_golang_jwt_jwt_HMAC/sign-HS512 -Benchmark_golang_jwt_jwt_HMAC/sign-HS512-10 358262 3353 ns/op 172.0 B/token 2176 B/op 27 allocs/op -Benchmark_golang_jwt_jwt_HMAC/sign-HS512-10 355081 3364 ns/op 172.0 B/token 2176 B/op 27 allocs/op -Benchmark_golang_jwt_jwt_HMAC/sign-HS512-10 359236 3361 ns/op 172.0 B/token 2176 B/op 27 allocs/op -Benchmark_golang_jwt_jwt_HMAC/sign-HS512-10 357702 3368 ns/op 172.0 B/token 2176 B/op 27 allocs/op -Benchmark_golang_jwt_jwt_HMAC/sign-HS512-10 356360 3362 ns/op 172.0 B/token 2176 B/op 27 allocs/op -Benchmark_golang_jwt_jwt_HMAC/check-HS256 -Benchmark_golang_jwt_jwt_HMAC/check-HS256-10 464704 2555 ns/op 3248 B/op 54 allocs/op -Benchmark_golang_jwt_jwt_HMAC/check-HS256-10 445372 2548 ns/op 3248 B/op 54 allocs/op -Benchmark_golang_jwt_jwt_HMAC/check-HS256-10 465698 2551 ns/op 3248 B/op 54 allocs/op -Benchmark_golang_jwt_jwt_HMAC/check-HS256-10 466240 2552 ns/op 3248 B/op 54 allocs/op -Benchmark_golang_jwt_jwt_HMAC/check-HS256-10 472140 2547 ns/op 3248 B/op 54 allocs/op -Benchmark_golang_jwt_jwt_HMAC/check-HS384 -Benchmark_golang_jwt_jwt_HMAC/check-HS384-10 267934 4412 ns/op 3616 B/op 54 allocs/op -Benchmark_golang_jwt_jwt_HMAC/check-HS384-10 271386 4429 ns/op 3616 B/op 54 allocs/op -Benchmark_golang_jwt_jwt_HMAC/check-HS384-10 271707 4426 ns/op 3616 B/op 54 allocs/op -Benchmark_golang_jwt_jwt_HMAC/check-HS384-10 269170 4416 ns/op 3616 B/op 54 allocs/op -Benchmark_golang_jwt_jwt_HMAC/check-HS384-10 271563 4426 ns/op 3616 B/op 54 allocs/op -Benchmark_golang_jwt_jwt_HMAC/check-HS512 -Benchmark_golang_jwt_jwt_HMAC/check-HS512-10 269169 4454 ns/op 3680 B/op 54 allocs/op -Benchmark_golang_jwt_jwt_HMAC/check-HS512-10 270244 4450 ns/op 3680 B/op 54 allocs/op -Benchmark_golang_jwt_jwt_HMAC/check-HS512-10 269605 4451 ns/op 3680 B/op 54 allocs/op -Benchmark_golang_jwt_jwt_HMAC/check-HS512-10 268952 4443 ns/op 3680 B/op 54 allocs/op -Benchmark_golang_jwt_jwt_HMAC/check-HS512-10 267988 4434 ns/op 3680 B/op 54 allocs/op -Benchmark_golang_jwt_jwt_RSA -Benchmark_golang_jwt_jwt_RSA/sign-1024-bit -Benchmark_golang_jwt_jwt_RSA/sign-1024-bit-10 5660 210562 ns/op 257.0 B/token 17849 B/op 124 allocs/op -Benchmark_golang_jwt_jwt_RSA/sign-1024-bit-10 5709 210480 ns/op 257.0 B/token 17849 B/op 124 allocs/op -Benchmark_golang_jwt_jwt_RSA/sign-1024-bit-10 5682 210307 ns/op 257.0 B/token 17849 B/op 124 allocs/op -Benchmark_golang_jwt_jwt_RSA/sign-1024-bit-10 5704 210917 ns/op 257.0 B/token 17850 B/op 124 allocs/op -Benchmark_golang_jwt_jwt_RSA/sign-1024-bit-10 5719 210507 ns/op 257.0 B/token 17849 B/op 124 allocs/op -Benchmark_golang_jwt_jwt_RSA/sign-2048-bit -Benchmark_golang_jwt_jwt_RSA/sign-2048-bit-10 1174 1020157 ns/op 428.0 B/token 32761 B/op 130 allocs/op -Benchmark_golang_jwt_jwt_RSA/sign-2048-bit-10 1177 1019760 ns/op 428.0 B/token 32764 B/op 130 allocs/op -Benchmark_golang_jwt_jwt_RSA/sign-2048-bit-10 1168 1020055 ns/op 428.0 B/token 32760 B/op 130 allocs/op -Benchmark_golang_jwt_jwt_RSA/sign-2048-bit-10 1177 1020451 ns/op 428.0 B/token 32759 B/op 130 allocs/op -Benchmark_golang_jwt_jwt_RSA/sign-2048-bit-10 1174 1019583 ns/op 428.0 B/token 32761 B/op 130 allocs/op -Benchmark_golang_jwt_jwt_RSA/sign-4096-bit -Benchmark_golang_jwt_jwt_RSA/sign-4096-bit-10 213 5605568 ns/op 769.0 B/token 79502 B/op 144 allocs/op -Benchmark_golang_jwt_jwt_RSA/sign-4096-bit-10 213 5605539 ns/op 769.0 B/token 79522 B/op 144 allocs/op -Benchmark_golang_jwt_jwt_RSA/sign-4096-bit-10 213 5605496 ns/op 769.0 B/token 79560 B/op 144 allocs/op -Benchmark_golang_jwt_jwt_RSA/sign-4096-bit-10 213 5604844 ns/op 769.0 B/token 79540 B/op 144 allocs/op -Benchmark_golang_jwt_jwt_RSA/sign-4096-bit-10 213 5602424 ns/op 769.0 B/token 79487 B/op 144 allocs/op -Benchmark_golang_jwt_jwt_RSA/check-1024-bit -Benchmark_golang_jwt_jwt_RSA/check-1024-bit-10 85509 14024 ns/op 5723 B/op 59 allocs/op -Benchmark_golang_jwt_jwt_RSA/check-1024-bit-10 85266 13967 ns/op 5722 B/op 59 allocs/op -Benchmark_golang_jwt_jwt_RSA/check-1024-bit-10 85592 14012 ns/op 5722 B/op 59 allocs/op -Benchmark_golang_jwt_jwt_RSA/check-1024-bit-10 85672 14023 ns/op 5723 B/op 59 allocs/op -Benchmark_golang_jwt_jwt_RSA/check-1024-bit-10 85806 14000 ns/op 5723 B/op 59 allocs/op -Benchmark_golang_jwt_jwt_RSA/check-2048-bit -Benchmark_golang_jwt_jwt_RSA/check-2048-bit-10 38884 30938 ns/op 8461 B/op 59 allocs/op -Benchmark_golang_jwt_jwt_RSA/check-2048-bit-10 38496 30866 ns/op 8461 B/op 59 allocs/op -Benchmark_golang_jwt_jwt_RSA/check-2048-bit-10 38930 30792 ns/op 8461 B/op 59 allocs/op -Benchmark_golang_jwt_jwt_RSA/check-2048-bit-10 38858 30817 ns/op 8461 B/op 59 allocs/op -Benchmark_golang_jwt_jwt_RSA/check-2048-bit-10 38990 30793 ns/op 8461 B/op 59 allocs/op -Benchmark_golang_jwt_jwt_RSA/check-4096-bit -Benchmark_golang_jwt_jwt_RSA/check-4096-bit-10 13519 88761 ns/op 18614 B/op 60 allocs/op -Benchmark_golang_jwt_jwt_RSA/check-4096-bit-10 13521 88787 ns/op 18615 B/op 60 allocs/op -Benchmark_golang_jwt_jwt_RSA/check-4096-bit-10 13515 88781 ns/op 18616 B/op 60 allocs/op -Benchmark_golang_jwt_jwt_RSA/check-4096-bit-10 13510 88740 ns/op 18613 B/op 60 allocs/op -Benchmark_golang_jwt_jwt_RSA/check-4096-bit-10 13528 88630 ns/op 18615 B/op 60 allocs/op -Benchmark_golang_jwt_jwt_ECDSA -Benchmark_golang_jwt_jwt_ECDSA/sign-256-bit -Benchmark_golang_jwt_jwt_ECDSA/sign-256-bit-10 58587 20416 ns/op 172.0 B/token 3996 B/op 54 allocs/op -Benchmark_golang_jwt_jwt_ECDSA/sign-256-bit-10 58545 20413 ns/op 172.0 B/token 3996 B/op 54 allocs/op -Benchmark_golang_jwt_jwt_ECDSA/sign-256-bit-10 58958 20373 ns/op 172.0 B/token 3996 B/op 54 allocs/op -Benchmark_golang_jwt_jwt_ECDSA/sign-256-bit-10 58999 20471 ns/op 172.0 B/token 3996 B/op 54 allocs/op -Benchmark_golang_jwt_jwt_ECDSA/sign-256-bit-10 58796 20388 ns/op 172.0 B/token 3996 B/op 54 allocs/op -Benchmark_golang_jwt_jwt_ECDSA/sign-384-bit -Benchmark_golang_jwt_jwt_ECDSA/sign-384-bit-10 2222 536719 ns/op 214.0 B/token 7434 B/op 82 allocs/op -Benchmark_golang_jwt_jwt_ECDSA/sign-384-bit-10 2233 536769 ns/op 214.0 B/token 7434 B/op 82 allocs/op -Benchmark_golang_jwt_jwt_ECDSA/sign-384-bit-10 2212 536847 ns/op 214.0 B/token 7434 B/op 82 allocs/op -Benchmark_golang_jwt_jwt_ECDSA/sign-384-bit-10 2234 536737 ns/op 214.0 B/token 7434 B/op 82 allocs/op -Benchmark_golang_jwt_jwt_ECDSA/sign-384-bit-10 2216 536669 ns/op 214.0 B/token 7434 B/op 82 allocs/op -Benchmark_golang_jwt_jwt_ECDSA/sign-521-bit -Benchmark_golang_jwt_jwt_ECDSA/sign-521-bit-10 748 1602664 ns/op 262.0 B/token 9180 B/op 82 allocs/op -Benchmark_golang_jwt_jwt_ECDSA/sign-521-bit-10 748 1601860 ns/op 262.0 B/token 9180 B/op 82 allocs/op -Benchmark_golang_jwt_jwt_ECDSA/sign-521-bit-10 747 1601900 ns/op 262.0 B/token 9179 B/op 82 allocs/op -Benchmark_golang_jwt_jwt_ECDSA/sign-521-bit-10 750 1602989 ns/op 262.0 B/token 9180 B/op 82 allocs/op -Benchmark_golang_jwt_jwt_ECDSA/sign-521-bit-10 748 1603239 ns/op 262.0 B/token 9180 B/op 82 allocs/op -Benchmark_golang_jwt_jwt_ECDSA/check-256-bit -Benchmark_golang_jwt_jwt_ECDSA/check-256-bit-10 20563 58236 ns/op 4041 B/op 68 allocs/op -Benchmark_golang_jwt_jwt_ECDSA/check-256-bit-10 20600 58305 ns/op 4041 B/op 68 allocs/op -Benchmark_golang_jwt_jwt_ECDSA/check-256-bit-10 20587 58258 ns/op 4041 B/op 68 allocs/op -Benchmark_golang_jwt_jwt_ECDSA/check-256-bit-10 20572 58275 ns/op 4041 B/op 68 allocs/op -Benchmark_golang_jwt_jwt_ECDSA/check-256-bit-10 20587 58224 ns/op 4041 B/op 68 allocs/op -Benchmark_golang_jwt_jwt_ECDSA/check-384-bit -Benchmark_golang_jwt_jwt_ECDSA/check-384-bit-10 1180 1010285 ns/op 7292 B/op 119 allocs/op -Benchmark_golang_jwt_jwt_ECDSA/check-384-bit-10 1188 1010886 ns/op 7292 B/op 119 allocs/op -Benchmark_golang_jwt_jwt_ECDSA/check-384-bit-10 1188 1010517 ns/op 7292 B/op 119 allocs/op -Benchmark_golang_jwt_jwt_ECDSA/check-384-bit-10 1188 1010456 ns/op 7292 B/op 119 allocs/op -Benchmark_golang_jwt_jwt_ECDSA/check-384-bit-10 1188 1010825 ns/op 7291 B/op 119 allocs/op -Benchmark_golang_jwt_jwt_ECDSA/check-521-bit -Benchmark_golang_jwt_jwt_ECDSA/check-521-bit-10 386 3100910 ns/op 8796 B/op 119 allocs/op -Benchmark_golang_jwt_jwt_ECDSA/check-521-bit-10 386 3108435 ns/op 8796 B/op 119 allocs/op -Benchmark_golang_jwt_jwt_ECDSA/check-521-bit-10 386 3101219 ns/op 8795 B/op 119 allocs/op -Benchmark_golang_jwt_jwt_ECDSA/check-521-bit-10 386 3102096 ns/op 8796 B/op 119 allocs/op -Benchmark_golang_jwt_jwt_ECDSA/check-521-bit-10 386 3101261 ns/op 8796 B/op 119 allocs/op +Benchmark_cristalhq_EdDSA +Benchmark_cristalhq_EdDSA/sign-EdDSA +Benchmark_cristalhq_EdDSA/sign-EdDSA-10 48038 24601 ns/op 172.0 B/token 480 B/op 6 allocs/op +Benchmark_cristalhq_EdDSA/sign-EdDSA-10 48878 24576 ns/op 172.0 B/token 480 B/op 6 allocs/op +Benchmark_cristalhq_EdDSA/sign-EdDSA-10 48878 24644 ns/op 172.0 B/token 480 B/op 6 allocs/op +Benchmark_cristalhq_EdDSA/sign-EdDSA-10 48692 24599 ns/op 172.0 B/token 480 B/op 6 allocs/op +Benchmark_cristalhq_EdDSA/sign-EdDSA-10 48694 24541 ns/op 172.0 B/token 480 B/op 6 allocs/op +Benchmark_cristalhq_EdDSA/check-EdDSA +Benchmark_cristalhq_EdDSA/check-EdDSA-10 23143 51990 ns/op 0 B/op 0 allocs/op +Benchmark_cristalhq_EdDSA/check-EdDSA-10 23143 51840 ns/op 0 B/op 0 allocs/op +Benchmark_cristalhq_EdDSA/check-EdDSA-10 23125 51857 ns/op 0 B/op 0 allocs/op +Benchmark_cristalhq_EdDSA/check-EdDSA-10 23136 51951 ns/op 0 B/op 0 allocs/op +Benchmark_cristalhq_EdDSA/check-EdDSA-10 23149 51848 ns/op 0 B/op 0 allocs/op +Benchmark_cristalhq_HMAC +Benchmark_cristalhq_HMAC/sign-HS256 +Benchmark_cristalhq_HMAC/sign-HS256-10 1687972 711.4 ns/op 129.0 B/token 416 B/op 6 allocs/op +Benchmark_cristalhq_HMAC/sign-HS256-10 1685468 712.2 ns/op 129.0 B/token 416 B/op 6 allocs/op +Benchmark_cristalhq_HMAC/sign-HS256-10 1684227 714.1 ns/op 129.0 B/token 416 B/op 6 allocs/op +Benchmark_cristalhq_HMAC/sign-HS256-10 1688468 709.2 ns/op 129.0 B/token 416 B/op 6 allocs/op +Benchmark_cristalhq_HMAC/sign-HS256-10 1689355 711.6 ns/op 129.0 B/token 416 B/op 6 allocs/op +Benchmark_cristalhq_HMAC/sign-HS384 +Benchmark_cristalhq_HMAC/sign-HS384-10 725773 1620 ns/op 150.0 B/token 448 B/op 6 allocs/op +Benchmark_cristalhq_HMAC/sign-HS384-10 728716 1623 ns/op 150.0 B/token 448 B/op 6 allocs/op +Benchmark_cristalhq_HMAC/sign-HS384-10 730410 1621 ns/op 150.0 B/token 448 B/op 6 allocs/op +Benchmark_cristalhq_HMAC/sign-HS384-10 726630 1620 ns/op 150.0 B/token 448 B/op 6 allocs/op +Benchmark_cristalhq_HMAC/sign-HS384-10 725888 1621 ns/op 150.0 B/token 448 B/op 6 allocs/op +Benchmark_cristalhq_HMAC/sign-HS512 +Benchmark_cristalhq_HMAC/sign-HS512-10 724214 1637 ns/op 172.0 B/token 480 B/op 6 allocs/op +Benchmark_cristalhq_HMAC/sign-HS512-10 722506 1640 ns/op 172.0 B/token 480 B/op 6 allocs/op +Benchmark_cristalhq_HMAC/sign-HS512-10 693190 1639 ns/op 172.0 B/token 480 B/op 6 allocs/op +Benchmark_cristalhq_HMAC/sign-HS512-10 719536 1640 ns/op 172.0 B/token 480 B/op 6 allocs/op +Benchmark_cristalhq_HMAC/sign-HS512-10 728365 1638 ns/op 172.0 B/token 480 B/op 6 allocs/op +Benchmark_cristalhq_HMAC/check-HS256 +Benchmark_cristalhq_HMAC/check-HS256-10 3826406 313.9 ns/op 32 B/op 1 allocs/op +Benchmark_cristalhq_HMAC/check-HS256-10 3827530 313.5 ns/op 32 B/op 1 allocs/op +Benchmark_cristalhq_HMAC/check-HS256-10 3819402 313.7 ns/op 32 B/op 1 allocs/op +Benchmark_cristalhq_HMAC/check-HS256-10 3819306 313.8 ns/op 32 B/op 1 allocs/op +Benchmark_cristalhq_HMAC/check-HS256-10 3824636 314.0 ns/op 32 B/op 1 allocs/op +Benchmark_cristalhq_HMAC/check-HS384 +Benchmark_cristalhq_HMAC/check-HS384-10 983746 1206 ns/op 48 B/op 1 allocs/op +Benchmark_cristalhq_HMAC/check-HS384-10 988362 1207 ns/op 48 B/op 1 allocs/op +Benchmark_cristalhq_HMAC/check-HS384-10 992890 1205 ns/op 48 B/op 1 allocs/op +Benchmark_cristalhq_HMAC/check-HS384-10 988776 1205 ns/op 48 B/op 1 allocs/op +Benchmark_cristalhq_HMAC/check-HS384-10 985551 1206 ns/op 48 B/op 1 allocs/op +Benchmark_cristalhq_HMAC/check-HS512 +Benchmark_cristalhq_HMAC/check-HS512-10 980251 1218 ns/op 64 B/op 1 allocs/op +Benchmark_cristalhq_HMAC/check-HS512-10 981992 1220 ns/op 64 B/op 1 allocs/op +Benchmark_cristalhq_HMAC/check-HS512-10 981384 1217 ns/op 64 B/op 1 allocs/op +Benchmark_cristalhq_HMAC/check-HS512-10 982975 1215 ns/op 64 B/op 1 allocs/op +Benchmark_cristalhq_HMAC/check-HS512-10 978519 1217 ns/op 64 B/op 1 allocs/op +Benchmark_cristalhq_RSA +Benchmark_cristalhq_RSA/sign-1024-bit +Benchmark_cristalhq_RSA/sign-1024-bit-10 5666 209658 ns/op 257.0 B/token 16822 B/op 109 allocs/op +Benchmark_cristalhq_RSA/sign-1024-bit-10 5702 210189 ns/op 257.0 B/token 16820 B/op 109 allocs/op +Benchmark_cristalhq_RSA/sign-1024-bit-10 5674 209743 ns/op 257.0 B/token 16822 B/op 109 allocs/op +Benchmark_cristalhq_RSA/sign-1024-bit-10 5674 209811 ns/op 257.0 B/token 16820 B/op 109 allocs/op +Benchmark_cristalhq_RSA/sign-1024-bit-10 5695 209625 ns/op 257.0 B/token 16822 B/op 109 allocs/op +Benchmark_cristalhq_RSA/sign-2048-bit +Benchmark_cristalhq_RSA/sign-2048-bit-10 1168 1024342 ns/op 428.0 B/token 31383 B/op 115 allocs/op +Benchmark_cristalhq_RSA/sign-2048-bit-10 1171 1024324 ns/op 428.0 B/token 31382 B/op 115 allocs/op +Benchmark_cristalhq_RSA/sign-2048-bit-10 1124 1026749 ns/op 428.0 B/token 31383 B/op 115 allocs/op +Benchmark_cristalhq_RSA/sign-2048-bit-10 1165 1023851 ns/op 428.0 B/token 31379 B/op 115 allocs/op +Benchmark_cristalhq_RSA/sign-2048-bit-10 1168 1022296 ns/op 428.0 B/token 31382 B/op 115 allocs/op +Benchmark_cristalhq_RSA/sign-4096-bit +Benchmark_cristalhq_RSA/sign-4096-bit-10 212 5633548 ns/op 769.0 B/token 77461 B/op 129 allocs/op +Benchmark_cristalhq_RSA/sign-4096-bit-10 212 5614326 ns/op 769.0 B/token 77433 B/op 129 allocs/op +Benchmark_cristalhq_RSA/sign-4096-bit-10 213 5608067 ns/op 769.0 B/token 77479 B/op 129 allocs/op +Benchmark_cristalhq_RSA/sign-4096-bit-10 213 5599901 ns/op 769.0 B/token 77439 B/op 129 allocs/op +Benchmark_cristalhq_RSA/sign-4096-bit-10 213 5604916 ns/op 769.0 B/token 77460 B/op 129 allocs/op +Benchmark_cristalhq_RSA/check-1024-bit +Benchmark_cristalhq_RSA/check-1024-bit-10 102832 11653 ns/op 2777 B/op 12 allocs/op +Benchmark_cristalhq_RSA/check-1024-bit-10 102446 11652 ns/op 2777 B/op 12 allocs/op +Benchmark_cristalhq_RSA/check-1024-bit-10 102830 11655 ns/op 2777 B/op 12 allocs/op +Benchmark_cristalhq_RSA/check-1024-bit-10 103052 11643 ns/op 2777 B/op 12 allocs/op +Benchmark_cristalhq_RSA/check-1024-bit-10 102802 11656 ns/op 2777 B/op 12 allocs/op +Benchmark_cristalhq_RSA/check-2048-bit +Benchmark_cristalhq_RSA/check-2048-bit-10 42026 28543 ns/op 5210 B/op 12 allocs/op +Benchmark_cristalhq_RSA/check-2048-bit-10 42163 28530 ns/op 5211 B/op 12 allocs/op +Benchmark_cristalhq_RSA/check-2048-bit-10 42103 28474 ns/op 5210 B/op 12 allocs/op +Benchmark_cristalhq_RSA/check-2048-bit-10 42145 28535 ns/op 5210 B/op 12 allocs/op +Benchmark_cristalhq_RSA/check-2048-bit-10 42090 28484 ns/op 5211 B/op 12 allocs/op +Benchmark_cristalhq_RSA/check-4096-bit +Benchmark_cristalhq_RSA/check-4096-bit-10 14018 85609 ns/op 14754 B/op 13 allocs/op +Benchmark_cristalhq_RSA/check-4096-bit-10 13992 85693 ns/op 14755 B/op 13 allocs/op +Benchmark_cristalhq_RSA/check-4096-bit-10 14013 85690 ns/op 14753 B/op 13 allocs/op +Benchmark_cristalhq_RSA/check-4096-bit-10 13962 85893 ns/op 14754 B/op 13 allocs/op +Benchmark_cristalhq_RSA/check-4096-bit-10 14006 86031 ns/op 14753 B/op 13 allocs/op +Benchmark_cristalhq_ECDSA +Benchmark_cristalhq_ECDSA/sign-ES256 +Benchmark_cristalhq_ECDSA/sign-ES256-10 60254 19792 ns/op 172.0 B/token 3187 B/op 41 allocs/op +Benchmark_cristalhq_ECDSA/sign-ES256-10 60559 19794 ns/op 172.0 B/token 3188 B/op 41 allocs/op +Benchmark_cristalhq_ECDSA/sign-ES256-10 60518 19774 ns/op 172.0 B/token 3188 B/op 41 allocs/op +Benchmark_cristalhq_ECDSA/sign-ES256-10 60669 19758 ns/op 172.0 B/token 3188 B/op 41 allocs/op +Benchmark_cristalhq_ECDSA/sign-ES256-10 60580 19757 ns/op 172.0 B/token 3188 B/op 41 allocs/op +Benchmark_cristalhq_ECDSA/sign-ES384 +Benchmark_cristalhq_ECDSA/sign-ES384-10 2240 535568 ns/op 214.0 B/token 6591 B/op 69 allocs/op +Benchmark_cristalhq_ECDSA/sign-ES384-10 2230 535658 ns/op 214.0 B/token 6591 B/op 69 allocs/op +Benchmark_cristalhq_ECDSA/sign-ES384-10 2235 536763 ns/op 214.0 B/token 6591 B/op 69 allocs/op +Benchmark_cristalhq_ECDSA/sign-ES384-10 2235 535557 ns/op 214.0 B/token 6592 B/op 69 allocs/op +Benchmark_cristalhq_ECDSA/sign-ES384-10 2224 535862 ns/op 214.0 B/token 6592 B/op 69 allocs/op +Benchmark_cristalhq_ECDSA/sign-ES512 +Benchmark_cristalhq_ECDSA/sign-ES512-10 748 1600164 ns/op 262.0 B/token 8308 B/op 69 allocs/op +Benchmark_cristalhq_ECDSA/sign-ES512-10 748 1601715 ns/op 262.0 B/token 8307 B/op 69 allocs/op +Benchmark_cristalhq_ECDSA/sign-ES512-10 745 1600699 ns/op 262.0 B/token 8307 B/op 69 allocs/op +Benchmark_cristalhq_ECDSA/sign-ES512-10 746 1601790 ns/op 262.0 B/token 8308 B/op 69 allocs/op +Benchmark_cristalhq_ECDSA/sign-ES512-10 746 1601936 ns/op 262.0 B/token 8307 B/op 69 allocs/op +Benchmark_cristalhq_ECDSA/check-ES256 +Benchmark_cristalhq_ECDSA/check-ES256-10 21486 55832 ns/op 1248 B/op 21 allocs/op +Benchmark_cristalhq_ECDSA/check-ES256-10 21403 55940 ns/op 1248 B/op 21 allocs/op +Benchmark_cristalhq_ECDSA/check-ES256-10 21486 55880 ns/op 1248 B/op 21 allocs/op +Benchmark_cristalhq_ECDSA/check-ES256-10 21499 55820 ns/op 1248 B/op 21 allocs/op +Benchmark_cristalhq_ECDSA/check-ES256-10 21517 55799 ns/op 1248 B/op 21 allocs/op +Benchmark_cristalhq_ECDSA/check-ES384 +Benchmark_cristalhq_ECDSA/check-ES384-10 1192 1006077 ns/op 4434 B/op 72 allocs/op +Benchmark_cristalhq_ECDSA/check-ES384-10 1191 1005289 ns/op 4434 B/op 72 allocs/op +Benchmark_cristalhq_ECDSA/check-ES384-10 1192 1005020 ns/op 4434 B/op 72 allocs/op +Benchmark_cristalhq_ECDSA/check-ES384-10 1192 1005469 ns/op 4434 B/op 72 allocs/op +Benchmark_cristalhq_ECDSA/check-ES384-10 1190 1005587 ns/op 4434 B/op 72 allocs/op +Benchmark_cristalhq_ECDSA/check-ES512 +Benchmark_cristalhq_ECDSA/check-ES512-10 385 3152044 ns/op 5844 B/op 72 allocs/op +Benchmark_cristalhq_ECDSA/check-ES512-10 375 3125700 ns/op 5844 B/op 72 allocs/op +Benchmark_cristalhq_ECDSA/check-ES512-10 384 3117594 ns/op 5844 B/op 72 allocs/op +Benchmark_cristalhq_ECDSA/check-ES512-10 384 3117390 ns/op 5843 B/op 72 allocs/op +Benchmark_cristalhq_ECDSA/check-ES512-10 384 3123422 ns/op 5843 B/op 72 allocs/op +Benchmark_pascaldekloe_EdDSA +Benchmark_pascaldekloe_EdDSA/sign-EdDSA +Benchmark_pascaldekloe_EdDSA/sign-EdDSA-10 49888 23990 ns/op 166.0 B/token 224 B/op 2 allocs/op +Benchmark_pascaldekloe_EdDSA/sign-EdDSA-10 49944 23996 ns/op 166.0 B/token 224 B/op 2 allocs/op +Benchmark_pascaldekloe_EdDSA/sign-EdDSA-10 50013 24005 ns/op 166.0 B/token 224 B/op 2 allocs/op +Benchmark_pascaldekloe_EdDSA/sign-EdDSA-10 50034 24005 ns/op 166.0 B/token 224 B/op 2 allocs/op +Benchmark_pascaldekloe_EdDSA/sign-EdDSA-10 50043 24006 ns/op 166.0 B/token 224 B/op 2 allocs/op +Benchmark_pascaldekloe_EdDSA/check-EdDSA +Benchmark_pascaldekloe_EdDSA/check-EdDSA-10 22470 53382 ns/op 1320 B/op 26 allocs/op +Benchmark_pascaldekloe_EdDSA/check-EdDSA-10 22452 53394 ns/op 1320 B/op 26 allocs/op +Benchmark_pascaldekloe_EdDSA/check-EdDSA-10 22459 53411 ns/op 1320 B/op 26 allocs/op +Benchmark_pascaldekloe_EdDSA/check-EdDSA-10 22479 53422 ns/op 1320 B/op 26 allocs/op +Benchmark_pascaldekloe_EdDSA/check-EdDSA-10 22455 53391 ns/op 1320 B/op 26 allocs/op +Benchmark_pascaldekloe_HMAC +Benchmark_pascaldekloe_HMAC/sign-HS256 +Benchmark_pascaldekloe_HMAC/sign-HS256-10 1510303 799.2 ns/op 123.0 B/token 656 B/op 7 allocs/op +Benchmark_pascaldekloe_HMAC/sign-HS256-10 1493904 801.0 ns/op 123.0 B/token 656 B/op 7 allocs/op +Benchmark_pascaldekloe_HMAC/sign-HS256-10 1500766 800.3 ns/op 123.0 B/token 656 B/op 7 allocs/op +Benchmark_pascaldekloe_HMAC/sign-HS256-10 1496866 801.5 ns/op 123.0 B/token 656 B/op 7 allocs/op +Benchmark_pascaldekloe_HMAC/sign-HS256-10 1497058 799.6 ns/op 123.0 B/token 656 B/op 7 allocs/op +Benchmark_pascaldekloe_HMAC/sign-HS384 +Benchmark_pascaldekloe_HMAC/sign-HS384-10 447494 2683 ns/op 144.0 B/token 992 B/op 7 allocs/op +Benchmark_pascaldekloe_HMAC/sign-HS384-10 445864 2672 ns/op 144.0 B/token 992 B/op 7 allocs/op +Benchmark_pascaldekloe_HMAC/sign-HS384-10 439272 2677 ns/op 144.0 B/token 992 B/op 7 allocs/op +Benchmark_pascaldekloe_HMAC/sign-HS384-10 434118 2672 ns/op 144.0 B/token 992 B/op 7 allocs/op +Benchmark_pascaldekloe_HMAC/sign-HS384-10 443274 2679 ns/op 144.0 B/token 992 B/op 7 allocs/op +Benchmark_pascaldekloe_HMAC/sign-HS512 +Benchmark_pascaldekloe_HMAC/sign-HS512-10 444696 2688 ns/op 166.0 B/token 1024 B/op 7 allocs/op +Benchmark_pascaldekloe_HMAC/sign-HS512-10 444146 2686 ns/op 166.0 B/token 1024 B/op 7 allocs/op +Benchmark_pascaldekloe_HMAC/sign-HS512-10 440916 2689 ns/op 166.0 B/token 1024 B/op 7 allocs/op +Benchmark_pascaldekloe_HMAC/sign-HS512-10 444733 2690 ns/op 166.0 B/token 1024 B/op 7 allocs/op +Benchmark_pascaldekloe_HMAC/sign-HS512-10 446044 2693 ns/op 166.0 B/token 1024 B/op 7 allocs/op +Benchmark_pascaldekloe_HMAC/check-HS256 +Benchmark_pascaldekloe_HMAC/check-HS256-10 614578 1905 ns/op 1752 B/op 31 allocs/op +Benchmark_pascaldekloe_HMAC/check-HS256-10 621232 1903 ns/op 1752 B/op 31 allocs/op +Benchmark_pascaldekloe_HMAC/check-HS256-10 635602 1912 ns/op 1752 B/op 31 allocs/op +Benchmark_pascaldekloe_HMAC/check-HS256-10 619737 1901 ns/op 1752 B/op 31 allocs/op +Benchmark_pascaldekloe_HMAC/check-HS256-10 631855 1905 ns/op 1752 B/op 31 allocs/op +Benchmark_pascaldekloe_HMAC/check-HS384 +Benchmark_pascaldekloe_HMAC/check-HS384-10 316443 3780 ns/op 2168 B/op 32 allocs/op +Benchmark_pascaldekloe_HMAC/check-HS384-10 316234 3778 ns/op 2168 B/op 32 allocs/op +Benchmark_pascaldekloe_HMAC/check-HS384-10 315879 3778 ns/op 2168 B/op 32 allocs/op +Benchmark_pascaldekloe_HMAC/check-HS384-10 319636 3786 ns/op 2168 B/op 32 allocs/op +Benchmark_pascaldekloe_HMAC/check-HS384-10 314652 3780 ns/op 2168 B/op 32 allocs/op +Benchmark_pascaldekloe_HMAC/check-HS512 +Benchmark_pascaldekloe_HMAC/check-HS512-10 313888 3799 ns/op 2216 B/op 32 allocs/op +Benchmark_pascaldekloe_HMAC/check-HS512-10 312476 3799 ns/op 2216 B/op 32 allocs/op +Benchmark_pascaldekloe_HMAC/check-HS512-10 315922 3803 ns/op 2216 B/op 32 allocs/op +Benchmark_pascaldekloe_HMAC/check-HS512-10 308049 3808 ns/op 2216 B/op 32 allocs/op +Benchmark_pascaldekloe_HMAC/check-HS512-10 312576 3807 ns/op 2216 B/op 32 allocs/op +Benchmark_pascaldekloe_RSA +Benchmark_pascaldekloe_RSA/sign-1024-bit +Benchmark_pascaldekloe_RSA/sign-1024-bit-10 5692 210238 ns/op 251.0 B/token 16543 B/op 105 allocs/op +Benchmark_pascaldekloe_RSA/sign-1024-bit-10 5742 209625 ns/op 251.0 B/token 16545 B/op 105 allocs/op +Benchmark_pascaldekloe_RSA/sign-1024-bit-10 5713 209636 ns/op 251.0 B/token 16544 B/op 105 allocs/op +Benchmark_pascaldekloe_RSA/sign-1024-bit-10 5694 209486 ns/op 251.0 B/token 16544 B/op 105 allocs/op +Benchmark_pascaldekloe_RSA/sign-1024-bit-10 5677 209629 ns/op 251.0 B/token 16544 B/op 105 allocs/op +Benchmark_pascaldekloe_RSA/sign-2048-bit +Benchmark_pascaldekloe_RSA/sign-2048-bit-10 1167 1021585 ns/op 422.0 B/token 31131 B/op 111 allocs/op +Benchmark_pascaldekloe_RSA/sign-2048-bit-10 1176 1021849 ns/op 422.0 B/token 31130 B/op 111 allocs/op +Benchmark_pascaldekloe_RSA/sign-2048-bit-10 1174 1027102 ns/op 422.0 B/token 31133 B/op 111 allocs/op +Benchmark_pascaldekloe_RSA/sign-2048-bit-10 1167 1022249 ns/op 422.0 B/token 31132 B/op 111 allocs/op +Benchmark_pascaldekloe_RSA/sign-2048-bit-10 1174 1021065 ns/op 422.0 B/token 31132 B/op 111 allocs/op +Benchmark_pascaldekloe_RSA/sign-4096-bit +Benchmark_pascaldekloe_RSA/sign-4096-bit-10 213 5610722 ns/op 763.0 B/token 77066 B/op 125 allocs/op +Benchmark_pascaldekloe_RSA/sign-4096-bit-10 213 5609565 ns/op 763.0 B/token 77064 B/op 125 allocs/op +Benchmark_pascaldekloe_RSA/sign-4096-bit-10 213 5611519 ns/op 763.0 B/token 77086 B/op 125 allocs/op +Benchmark_pascaldekloe_RSA/sign-4096-bit-10 213 5608090 ns/op 763.0 B/token 77081 B/op 125 allocs/op +Benchmark_pascaldekloe_RSA/sign-4096-bit-10 213 5609843 ns/op 763.0 B/token 77064 B/op 125 allocs/op +Benchmark_pascaldekloe_RSA/check-1024-bit +Benchmark_pascaldekloe_RSA/check-1024-bit-10 90940 13158 ns/op 4138 B/op 37 allocs/op +Benchmark_pascaldekloe_RSA/check-1024-bit-10 91090 13146 ns/op 4138 B/op 37 allocs/op +Benchmark_pascaldekloe_RSA/check-1024-bit-10 90820 13161 ns/op 4138 B/op 37 allocs/op +Benchmark_pascaldekloe_RSA/check-1024-bit-10 91384 13154 ns/op 4138 B/op 37 allocs/op +Benchmark_pascaldekloe_RSA/check-1024-bit-10 91460 13138 ns/op 4138 B/op 37 allocs/op +Benchmark_pascaldekloe_RSA/check-2048-bit +Benchmark_pascaldekloe_RSA/check-2048-bit-10 40386 29648 ns/op 6763 B/op 37 allocs/op +Benchmark_pascaldekloe_RSA/check-2048-bit-10 40392 29723 ns/op 6764 B/op 37 allocs/op +Benchmark_pascaldekloe_RSA/check-2048-bit-10 40418 29667 ns/op 6764 B/op 37 allocs/op +Benchmark_pascaldekloe_RSA/check-2048-bit-10 40459 29658 ns/op 6764 B/op 37 allocs/op +Benchmark_pascaldekloe_RSA/check-2048-bit-10 40522 29623 ns/op 6764 B/op 37 allocs/op +Benchmark_pascaldekloe_RSA/check-4096-bit +Benchmark_pascaldekloe_RSA/check-4096-bit-10 13657 87844 ns/op 16629 B/op 38 allocs/op +Benchmark_pascaldekloe_RSA/check-4096-bit-10 13681 87948 ns/op 16631 B/op 38 allocs/op +Benchmark_pascaldekloe_RSA/check-4096-bit-10 13652 87778 ns/op 16629 B/op 38 allocs/op +Benchmark_pascaldekloe_RSA/check-4096-bit-10 13653 87939 ns/op 16630 B/op 38 allocs/op +Benchmark_pascaldekloe_RSA/check-4096-bit-10 13664 87823 ns/op 16628 B/op 38 allocs/op +Benchmark_pascaldekloe_ECDSA +Benchmark_pascaldekloe_ECDSA/sign-ES256 +Benchmark_pascaldekloe_ECDSA/sign-ES256-10 60277 19603 ns/op 166.0 B/token 2835 B/op 34 allocs/op +Benchmark_pascaldekloe_ECDSA/sign-ES256-10 60956 19623 ns/op 166.0 B/token 2835 B/op 34 allocs/op +Benchmark_pascaldekloe_ECDSA/sign-ES256-10 61306 19601 ns/op 166.0 B/token 2835 B/op 34 allocs/op +Benchmark_pascaldekloe_ECDSA/sign-ES256-10 61209 19603 ns/op 166.0 B/token 2835 B/op 34 allocs/op +Benchmark_pascaldekloe_ECDSA/sign-ES256-10 61102 19597 ns/op 166.0 B/token 2835 B/op 34 allocs/op +Benchmark_pascaldekloe_ECDSA/sign-ES384 +Benchmark_pascaldekloe_ECDSA/sign-ES384-10 2238 536110 ns/op 208.0 B/token 6145 B/op 62 allocs/op +Benchmark_pascaldekloe_ECDSA/sign-ES384-10 2236 536136 ns/op 208.0 B/token 6145 B/op 62 allocs/op +Benchmark_pascaldekloe_ECDSA/sign-ES384-10 2238 536494 ns/op 208.0 B/token 6145 B/op 62 allocs/op +Benchmark_pascaldekloe_ECDSA/sign-ES384-10 2236 535921 ns/op 208.0 B/token 6145 B/op 62 allocs/op +Benchmark_pascaldekloe_ECDSA/sign-ES384-10 2236 536471 ns/op 208.0 B/token 6145 B/op 62 allocs/op +Benchmark_pascaldekloe_ECDSA/sign-ES512 +Benchmark_pascaldekloe_ECDSA/sign-ES512-10 750 1602887 ns/op 256.0 B/token 7716 B/op 62 allocs/op +Benchmark_pascaldekloe_ECDSA/sign-ES512-10 748 1602064 ns/op 256.0 B/token 7716 B/op 62 allocs/op +Benchmark_pascaldekloe_ECDSA/sign-ES512-10 748 1600806 ns/op 256.0 B/token 7716 B/op 62 allocs/op +Benchmark_pascaldekloe_ECDSA/sign-ES512-10 750 1602336 ns/op 256.0 B/token 7715 B/op 62 allocs/op +Benchmark_pascaldekloe_ECDSA/sign-ES512-10 748 1601573 ns/op 256.0 B/token 7715 B/op 62 allocs/op +Benchmark_pascaldekloe_ECDSA/check-ES256 +Benchmark_pascaldekloe_ECDSA/check-ES256-10 20866 57413 ns/op 2537 B/op 46 allocs/op +Benchmark_pascaldekloe_ECDSA/check-ES256-10 20901 57395 ns/op 2537 B/op 46 allocs/op +Benchmark_pascaldekloe_ECDSA/check-ES256-10 20896 57373 ns/op 2537 B/op 46 allocs/op +Benchmark_pascaldekloe_ECDSA/check-ES256-10 20887 57442 ns/op 2537 B/op 46 allocs/op +Benchmark_pascaldekloe_ECDSA/check-ES256-10 20892 57363 ns/op 2537 B/op 46 allocs/op +Benchmark_pascaldekloe_ECDSA/check-ES384 +Benchmark_pascaldekloe_ECDSA/check-ES384-10 1190 1008136 ns/op 5642 B/op 96 allocs/op +Benchmark_pascaldekloe_ECDSA/check-ES384-10 1191 1008285 ns/op 5642 B/op 96 allocs/op +Benchmark_pascaldekloe_ECDSA/check-ES384-10 1183 1007909 ns/op 5642 B/op 96 allocs/op +Benchmark_pascaldekloe_ECDSA/check-ES384-10 1189 1008161 ns/op 5643 B/op 96 allocs/op +Benchmark_pascaldekloe_ECDSA/check-ES384-10 1190 1007879 ns/op 5642 B/op 96 allocs/op +Benchmark_pascaldekloe_ECDSA/check-ES512 +Benchmark_pascaldekloe_ECDSA/check-ES512-10 386 3097249 ns/op 7180 B/op 97 allocs/op +Benchmark_pascaldekloe_ECDSA/check-ES512-10 386 3097214 ns/op 7180 B/op 97 allocs/op +Benchmark_pascaldekloe_ECDSA/check-ES512-10 386 3098215 ns/op 7180 B/op 97 allocs/op +Benchmark_pascaldekloe_ECDSA/check-ES512-10 386 3097509 ns/op 7180 B/op 97 allocs/op +Benchmark_pascaldekloe_ECDSA/check-ES512-10 386 3096805 ns/op 7180 B/op 97 allocs/op +Benchmark_golang_jwt_EdDSA +Benchmark_golang_jwt_EdDSA-10 1000000000 0.0000001 ns/op 0 B/op 0 allocs/op +Benchmark_golang_jwt_EdDSA-10 1000000000 0.0000000 ns/op 0 B/op 0 allocs/op +Benchmark_golang_jwt_EdDSA-10 1000000000 0.0000000 ns/op 0 B/op 0 allocs/op +Benchmark_golang_jwt_EdDSA-10 1000000000 0.0000000 ns/op 0 B/op 0 allocs/op +Benchmark_golang_jwt_EdDSA-10 1000000000 0 B/op 0 allocs/op +Benchmark_golang_jwt_HMAC +Benchmark_golang_jwt_HMAC/sign-HS256 +Benchmark_golang_jwt_HMAC/sign-HS256-10 781130 1482 ns/op 129.0 B/token 1696 B/op 27 allocs/op +Benchmark_golang_jwt_HMAC/sign-HS256-10 798369 1476 ns/op 129.0 B/token 1696 B/op 27 allocs/op +Benchmark_golang_jwt_HMAC/sign-HS256-10 810096 1478 ns/op 129.0 B/token 1696 B/op 27 allocs/op +Benchmark_golang_jwt_HMAC/sign-HS256-10 802693 1476 ns/op 129.0 B/token 1696 B/op 27 allocs/op +Benchmark_golang_jwt_HMAC/sign-HS256-10 810577 1470 ns/op 129.0 B/token 1696 B/op 27 allocs/op +Benchmark_golang_jwt_HMAC/sign-HS384 +Benchmark_golang_jwt_HMAC/sign-HS384-10 362635 3333 ns/op 150.0 B/token 2080 B/op 27 allocs/op +Benchmark_golang_jwt_HMAC/sign-HS384-10 360958 3330 ns/op 150.0 B/token 2080 B/op 27 allocs/op +Benchmark_golang_jwt_HMAC/sign-HS384-10 358340 3336 ns/op 150.0 B/token 2080 B/op 27 allocs/op +Benchmark_golang_jwt_HMAC/sign-HS384-10 354702 3337 ns/op 150.0 B/token 2080 B/op 27 allocs/op +Benchmark_golang_jwt_HMAC/sign-HS384-10 358450 3347 ns/op 150.0 B/token 2080 B/op 27 allocs/op +Benchmark_golang_jwt_HMAC/sign-HS512 +Benchmark_golang_jwt_HMAC/sign-HS512-10 358262 3353 ns/op 172.0 B/token 2176 B/op 27 allocs/op +Benchmark_golang_jwt_HMAC/sign-HS512-10 355081 3364 ns/op 172.0 B/token 2176 B/op 27 allocs/op +Benchmark_golang_jwt_HMAC/sign-HS512-10 359236 3361 ns/op 172.0 B/token 2176 B/op 27 allocs/op +Benchmark_golang_jwt_HMAC/sign-HS512-10 357702 3368 ns/op 172.0 B/token 2176 B/op 27 allocs/op +Benchmark_golang_jwt_HMAC/sign-HS512-10 356360 3362 ns/op 172.0 B/token 2176 B/op 27 allocs/op +Benchmark_golang_jwt_HMAC/check-HS256 +Benchmark_golang_jwt_HMAC/check-HS256-10 464704 2555 ns/op 3248 B/op 54 allocs/op +Benchmark_golang_jwt_HMAC/check-HS256-10 445372 2548 ns/op 3248 B/op 54 allocs/op +Benchmark_golang_jwt_HMAC/check-HS256-10 465698 2551 ns/op 3248 B/op 54 allocs/op +Benchmark_golang_jwt_HMAC/check-HS256-10 466240 2552 ns/op 3248 B/op 54 allocs/op +Benchmark_golang_jwt_HMAC/check-HS256-10 472140 2547 ns/op 3248 B/op 54 allocs/op +Benchmark_golang_jwt_HMAC/check-HS384 +Benchmark_golang_jwt_HMAC/check-HS384-10 267934 4412 ns/op 3616 B/op 54 allocs/op +Benchmark_golang_jwt_HMAC/check-HS384-10 271386 4429 ns/op 3616 B/op 54 allocs/op +Benchmark_golang_jwt_HMAC/check-HS384-10 271707 4426 ns/op 3616 B/op 54 allocs/op +Benchmark_golang_jwt_HMAC/check-HS384-10 269170 4416 ns/op 3616 B/op 54 allocs/op +Benchmark_golang_jwt_HMAC/check-HS384-10 271563 4426 ns/op 3616 B/op 54 allocs/op +Benchmark_golang_jwt_HMAC/check-HS512 +Benchmark_golang_jwt_HMAC/check-HS512-10 269169 4454 ns/op 3680 B/op 54 allocs/op +Benchmark_golang_jwt_HMAC/check-HS512-10 270244 4450 ns/op 3680 B/op 54 allocs/op +Benchmark_golang_jwt_HMAC/check-HS512-10 269605 4451 ns/op 3680 B/op 54 allocs/op +Benchmark_golang_jwt_HMAC/check-HS512-10 268952 4443 ns/op 3680 B/op 54 allocs/op +Benchmark_golang_jwt_HMAC/check-HS512-10 267988 4434 ns/op 3680 B/op 54 allocs/op +Benchmark_golang_jwt_RSA +Benchmark_golang_jwt_RSA/sign-1024-bit +Benchmark_golang_jwt_RSA/sign-1024-bit-10 5660 210562 ns/op 257.0 B/token 17849 B/op 124 allocs/op +Benchmark_golang_jwt_RSA/sign-1024-bit-10 5709 210480 ns/op 257.0 B/token 17849 B/op 124 allocs/op +Benchmark_golang_jwt_RSA/sign-1024-bit-10 5682 210307 ns/op 257.0 B/token 17849 B/op 124 allocs/op +Benchmark_golang_jwt_RSA/sign-1024-bit-10 5704 210917 ns/op 257.0 B/token 17850 B/op 124 allocs/op +Benchmark_golang_jwt_RSA/sign-1024-bit-10 5719 210507 ns/op 257.0 B/token 17849 B/op 124 allocs/op +Benchmark_golang_jwt_RSA/sign-2048-bit +Benchmark_golang_jwt_RSA/sign-2048-bit-10 1174 1020157 ns/op 428.0 B/token 32761 B/op 130 allocs/op +Benchmark_golang_jwt_RSA/sign-2048-bit-10 1177 1019760 ns/op 428.0 B/token 32764 B/op 130 allocs/op +Benchmark_golang_jwt_RSA/sign-2048-bit-10 1168 1020055 ns/op 428.0 B/token 32760 B/op 130 allocs/op +Benchmark_golang_jwt_RSA/sign-2048-bit-10 1177 1020451 ns/op 428.0 B/token 32759 B/op 130 allocs/op +Benchmark_golang_jwt_RSA/sign-2048-bit-10 1174 1019583 ns/op 428.0 B/token 32761 B/op 130 allocs/op +Benchmark_golang_jwt_RSA/sign-4096-bit +Benchmark_golang_jwt_RSA/sign-4096-bit-10 213 5605568 ns/op 769.0 B/token 79502 B/op 144 allocs/op +Benchmark_golang_jwt_RSA/sign-4096-bit-10 213 5605539 ns/op 769.0 B/token 79522 B/op 144 allocs/op +Benchmark_golang_jwt_RSA/sign-4096-bit-10 213 5605496 ns/op 769.0 B/token 79560 B/op 144 allocs/op +Benchmark_golang_jwt_RSA/sign-4096-bit-10 213 5604844 ns/op 769.0 B/token 79540 B/op 144 allocs/op +Benchmark_golang_jwt_RSA/sign-4096-bit-10 213 5602424 ns/op 769.0 B/token 79487 B/op 144 allocs/op +Benchmark_golang_jwt_RSA/check-1024-bit +Benchmark_golang_jwt_RSA/check-1024-bit-10 85509 14024 ns/op 5723 B/op 59 allocs/op +Benchmark_golang_jwt_RSA/check-1024-bit-10 85266 13967 ns/op 5722 B/op 59 allocs/op +Benchmark_golang_jwt_RSA/check-1024-bit-10 85592 14012 ns/op 5722 B/op 59 allocs/op +Benchmark_golang_jwt_RSA/check-1024-bit-10 85672 14023 ns/op 5723 B/op 59 allocs/op +Benchmark_golang_jwt_RSA/check-1024-bit-10 85806 14000 ns/op 5723 B/op 59 allocs/op +Benchmark_golang_jwt_RSA/check-2048-bit +Benchmark_golang_jwt_RSA/check-2048-bit-10 38884 30938 ns/op 8461 B/op 59 allocs/op +Benchmark_golang_jwt_RSA/check-2048-bit-10 38496 30866 ns/op 8461 B/op 59 allocs/op +Benchmark_golang_jwt_RSA/check-2048-bit-10 38930 30792 ns/op 8461 B/op 59 allocs/op +Benchmark_golang_jwt_RSA/check-2048-bit-10 38858 30817 ns/op 8461 B/op 59 allocs/op +Benchmark_golang_jwt_RSA/check-2048-bit-10 38990 30793 ns/op 8461 B/op 59 allocs/op +Benchmark_golang_jwt_RSA/check-4096-bit +Benchmark_golang_jwt_RSA/check-4096-bit-10 13519 88761 ns/op 18614 B/op 60 allocs/op +Benchmark_golang_jwt_RSA/check-4096-bit-10 13521 88787 ns/op 18615 B/op 60 allocs/op +Benchmark_golang_jwt_RSA/check-4096-bit-10 13515 88781 ns/op 18616 B/op 60 allocs/op +Benchmark_golang_jwt_RSA/check-4096-bit-10 13510 88740 ns/op 18613 B/op 60 allocs/op +Benchmark_golang_jwt_RSA/check-4096-bit-10 13528 88630 ns/op 18615 B/op 60 allocs/op +Benchmark_golang_jwt_ECDSA +Benchmark_golang_jwt_ECDSA/sign-256-bit +Benchmark_golang_jwt_ECDSA/sign-256-bit-10 58587 20416 ns/op 172.0 B/token 3996 B/op 54 allocs/op +Benchmark_golang_jwt_ECDSA/sign-256-bit-10 58545 20413 ns/op 172.0 B/token 3996 B/op 54 allocs/op +Benchmark_golang_jwt_ECDSA/sign-256-bit-10 58958 20373 ns/op 172.0 B/token 3996 B/op 54 allocs/op +Benchmark_golang_jwt_ECDSA/sign-256-bit-10 58999 20471 ns/op 172.0 B/token 3996 B/op 54 allocs/op +Benchmark_golang_jwt_ECDSA/sign-256-bit-10 58796 20388 ns/op 172.0 B/token 3996 B/op 54 allocs/op +Benchmark_golang_jwt_ECDSA/sign-384-bit +Benchmark_golang_jwt_ECDSA/sign-384-bit-10 2222 536719 ns/op 214.0 B/token 7434 B/op 82 allocs/op +Benchmark_golang_jwt_ECDSA/sign-384-bit-10 2233 536769 ns/op 214.0 B/token 7434 B/op 82 allocs/op +Benchmark_golang_jwt_ECDSA/sign-384-bit-10 2212 536847 ns/op 214.0 B/token 7434 B/op 82 allocs/op +Benchmark_golang_jwt_ECDSA/sign-384-bit-10 2234 536737 ns/op 214.0 B/token 7434 B/op 82 allocs/op +Benchmark_golang_jwt_ECDSA/sign-384-bit-10 2216 536669 ns/op 214.0 B/token 7434 B/op 82 allocs/op +Benchmark_golang_jwt_ECDSA/sign-521-bit +Benchmark_golang_jwt_ECDSA/sign-521-bit-10 748 1602664 ns/op 262.0 B/token 9180 B/op 82 allocs/op +Benchmark_golang_jwt_ECDSA/sign-521-bit-10 748 1601860 ns/op 262.0 B/token 9180 B/op 82 allocs/op +Benchmark_golang_jwt_ECDSA/sign-521-bit-10 747 1601900 ns/op 262.0 B/token 9179 B/op 82 allocs/op +Benchmark_golang_jwt_ECDSA/sign-521-bit-10 750 1602989 ns/op 262.0 B/token 9180 B/op 82 allocs/op +Benchmark_golang_jwt_ECDSA/sign-521-bit-10 748 1603239 ns/op 262.0 B/token 9180 B/op 82 allocs/op +Benchmark_golang_jwt_ECDSA/check-256-bit +Benchmark_golang_jwt_ECDSA/check-256-bit-10 20563 58236 ns/op 4041 B/op 68 allocs/op +Benchmark_golang_jwt_ECDSA/check-256-bit-10 20600 58305 ns/op 4041 B/op 68 allocs/op +Benchmark_golang_jwt_ECDSA/check-256-bit-10 20587 58258 ns/op 4041 B/op 68 allocs/op +Benchmark_golang_jwt_ECDSA/check-256-bit-10 20572 58275 ns/op 4041 B/op 68 allocs/op +Benchmark_golang_jwt_ECDSA/check-256-bit-10 20587 58224 ns/op 4041 B/op 68 allocs/op +Benchmark_golang_jwt_ECDSA/check-384-bit +Benchmark_golang_jwt_ECDSA/check-384-bit-10 1180 1010285 ns/op 7292 B/op 119 allocs/op +Benchmark_golang_jwt_ECDSA/check-384-bit-10 1188 1010886 ns/op 7292 B/op 119 allocs/op +Benchmark_golang_jwt_ECDSA/check-384-bit-10 1188 1010517 ns/op 7292 B/op 119 allocs/op +Benchmark_golang_jwt_ECDSA/check-384-bit-10 1188 1010456 ns/op 7292 B/op 119 allocs/op +Benchmark_golang_jwt_ECDSA/check-384-bit-10 1188 1010825 ns/op 7291 B/op 119 allocs/op +Benchmark_golang_jwt_ECDSA/check-521-bit +Benchmark_golang_jwt_ECDSA/check-521-bit-10 386 3100910 ns/op 8796 B/op 119 allocs/op +Benchmark_golang_jwt_ECDSA/check-521-bit-10 386 3108435 ns/op 8796 B/op 119 allocs/op +Benchmark_golang_jwt_ECDSA/check-521-bit-10 386 3101219 ns/op 8795 B/op 119 allocs/op +Benchmark_golang_jwt_ECDSA/check-521-bit-10 386 3102096 ns/op 8796 B/op 119 allocs/op +Benchmark_golang_jwt_ECDSA/check-521-bit-10 386 3101261 ns/op 8796 B/op 119 allocs/op PASS diff --git a/jwt/bench_test.go b/jwt/bench_test.go index 6c17fa8..a8d35c2 100644 --- a/jwt/bench_test.go +++ b/jwt/bench_test.go @@ -7,43 +7,43 @@ import ( "testing" "time" - cristalhq_jwt "github.com/cristalhq/jwt/v4" - golang_jwt_jwt "github.com/golang-jwt/jwt" - lestrrat_go_jwx "github.com/lestrrat-go/jwx" - pascaldekloe_jwt "github.com/pascaldekloe/jwt" + cristalhq "github.com/cristalhq/jwt/v4" + golang_jwt "github.com/golang-jwt/jwt" + lestrrat_go "github.com/lestrrat-go/jwx" + pascaldekloe "github.com/pascaldekloe/jwt" ) -var cristalhq_jwt_benchClaims = &struct { - cristalhq_jwt.RegisteredClaims +var cristalhq_benchClaims = &struct { + cristalhq.RegisteredClaims }{ - RegisteredClaims: cristalhq_jwt.RegisteredClaims{ + RegisteredClaims: cristalhq.RegisteredClaims{ Issuer: "benchmark", - IssuedAt: cristalhq_jwt.NewNumericDate(time.Now()), + IssuedAt: cristalhq.NewNumericDate(time.Now()), }, } -func Benchmark_cristalhq_jwt_EdDSA(b *testing.B) { - signer, err := cristalhq_jwt.NewSignerEdDSA(testKeyEd25519Private) +func Benchmark_cristalhq_EdDSA(b *testing.B) { + signer, err := cristalhq.NewSignerEdDSA(testKeyEd25519Private) failIfErr(b, err) - bui := cristalhq_jwt.NewBuilder(signer) - b.Run("sign-"+cristalhq_jwt.EdDSA.String(), func(b *testing.B) { + bui := cristalhq.NewBuilder(signer) + b.Run("sign-"+cristalhq.EdDSA.String(), func(b *testing.B) { var tokenLen int for i := 0; i < b.N; i++ { - token, err := bui.Build(cristalhq_jwt_benchClaims) + token, err := bui.Build(cristalhq_benchClaims) failIfErr(b, err) tokenLen += len(token.Bytes()) } b.ReportMetric(float64(tokenLen)/float64(b.N), "B/token") }) - token, err := cristalhq_jwt.NewBuilder(signer).Build(cristalhq_jwt_benchClaims) + token, err := cristalhq.NewBuilder(signer).Build(cristalhq_benchClaims) failIfErr(b, err) - verifier, err := cristalhq_jwt.NewVerifierEdDSA(testKeyEd25519Public) + verifier, err := cristalhq.NewVerifierEdDSA(testKeyEd25519Public) failIfErr(b, err) - b.Run("check-"+cristalhq_jwt.EdDSA.String(), func(b *testing.B) { + b.Run("check-"+cristalhq.EdDSA.String(), func(b *testing.B) { for i := 0; i < b.N; i++ { err := verifier.Verify(token) failIfErr(b, err) @@ -51,17 +51,17 @@ func Benchmark_cristalhq_jwt_EdDSA(b *testing.B) { }) } -func Benchmark_cristalhq_jwt_HMAC(b *testing.B) { - algs := []cristalhq_jwt.Algorithm{cristalhq_jwt.HS256, cristalhq_jwt.HS384, cristalhq_jwt.HS512} +func Benchmark_cristalhq_HMAC(b *testing.B) { + algs := []cristalhq.Algorithm{cristalhq.HS256, cristalhq.HS384, cristalhq.HS512} for _, alg := range algs { - signer, err := cristalhq_jwt.NewSignerHS(alg, keysHMAC) + signer, err := cristalhq.NewSignerHS(alg, keysHMAC) failIfErr(b, err) - bui := cristalhq_jwt.NewBuilder(signer) + bui := cristalhq.NewBuilder(signer) b.Run("sign-"+alg.String(), func(b *testing.B) { var tokenLen int for i := 0; i < b.N; i++ { - token, err := bui.Build(cristalhq_jwt_benchClaims) + token, err := bui.Build(cristalhq_benchClaims) failIfErr(b, err) tokenLen += len(token.Bytes()) } @@ -70,12 +70,12 @@ func Benchmark_cristalhq_jwt_HMAC(b *testing.B) { } for _, alg := range algs { - signer, err := cristalhq_jwt.NewSignerHS(alg, keysHMAC) + signer, err := cristalhq.NewSignerHS(alg, keysHMAC) failIfErr(b, err) - token, err := cristalhq_jwt.NewBuilder(signer).Build(cristalhq_jwt_benchClaims) + token, err := cristalhq.NewBuilder(signer).Build(cristalhq_benchClaims) failIfErr(b, err) - verifier, err := cristalhq_jwt.NewVerifierHS(alg, keysHMAC) + verifier, err := cristalhq.NewVerifierHS(alg, keysHMAC) failIfErr(b, err) b.Run("check-"+alg.String(), func(b *testing.B) { for i := 0; i < b.N; i++ { @@ -86,17 +86,17 @@ func Benchmark_cristalhq_jwt_HMAC(b *testing.B) { } } -func Benchmark_cristalhq_jwt_RSA(b *testing.B) { +func Benchmark_cristalhq_RSA(b *testing.B) { keys := []*rsa.PrivateKey{testKeyRSA1024, testKeyRSA2048, testKeyRSA4096} for _, key := range keys { - signer, err := cristalhq_jwt.NewSignerRS(cristalhq_jwt.RS384, key) + signer, err := cristalhq.NewSignerRS(cristalhq.RS384, key) failIfErr(b, err) - bui := cristalhq_jwt.NewBuilder(signer) + bui := cristalhq.NewBuilder(signer) b.Run(fmt.Sprintf("sign-%d-bit", key.Size()*8), func(b *testing.B) { var tokenLen int for i := 0; i < b.N; i++ { - token, err := bui.Build(cristalhq_jwt_benchClaims) + token, err := bui.Build(cristalhq_benchClaims) failIfErr(b, err) tokenLen += len(token.Bytes()) } @@ -105,12 +105,12 @@ func Benchmark_cristalhq_jwt_RSA(b *testing.B) { } for _, key := range keys { - signer, err := cristalhq_jwt.NewSignerRS(cristalhq_jwt.RS384, key) + signer, err := cristalhq.NewSignerRS(cristalhq.RS384, key) failIfErr(b, err) - token, err := cristalhq_jwt.NewBuilder(signer).Build(cristalhq_jwt_benchClaims) + token, err := cristalhq.NewBuilder(signer).Build(cristalhq_benchClaims) failIfErr(b, err) - verifier, err := cristalhq_jwt.NewVerifierRS(cristalhq_jwt.RS384, &key.PublicKey) + verifier, err := cristalhq.NewVerifierRS(cristalhq.RS384, &key.PublicKey) failIfErr(b, err) b.Run(fmt.Sprintf("check-%d-bit", key.Size()*8), func(b *testing.B) { for i := 0; i < b.N; i++ { @@ -121,24 +121,24 @@ func Benchmark_cristalhq_jwt_RSA(b *testing.B) { } } -func Benchmark_cristalhq_jwt_ECDSA(b *testing.B) { +func Benchmark_cristalhq_ECDSA(b *testing.B) { tests := []struct { key *ecdsa.PrivateKey - alg cristalhq_jwt.Algorithm + alg cristalhq.Algorithm }{ - {keysECDSA[0], cristalhq_jwt.ES256}, - {keysECDSA[1], cristalhq_jwt.ES384}, - {keysECDSA[2], cristalhq_jwt.ES512}, + {keysECDSA[0], cristalhq.ES256}, + {keysECDSA[1], cristalhq.ES384}, + {keysECDSA[2], cristalhq.ES512}, } for _, test := range tests { - signer, err := cristalhq_jwt.NewSignerES(test.alg, test.key) + signer, err := cristalhq.NewSignerES(test.alg, test.key) failIfErr(b, err) - bui := cristalhq_jwt.NewBuilder(signer) + bui := cristalhq.NewBuilder(signer) b.Run("sign-"+test.alg.String(), func(b *testing.B) { var tokenLen int for i := 0; i < b.N; i++ { - token, err := bui.Build(cristalhq_jwt_benchClaims) + token, err := bui.Build(cristalhq_benchClaims) failIfErr(b, err) tokenLen += len(token.Bytes()) } @@ -147,13 +147,13 @@ func Benchmark_cristalhq_jwt_ECDSA(b *testing.B) { } for _, test := range tests { - signer, err := cristalhq_jwt.NewSignerES(test.alg, test.key) + signer, err := cristalhq.NewSignerES(test.alg, test.key) failIfErr(b, err) - bui := cristalhq_jwt.NewBuilder(signer) - token, err := bui.Build(cristalhq_jwt_benchClaims) + bui := cristalhq.NewBuilder(signer) + token, err := bui.Build(cristalhq_benchClaims) failIfErr(b, err) - verifier, err := cristalhq_jwt.NewVerifierES(test.alg, &test.key.PublicKey) + verifier, err := cristalhq.NewVerifierES(test.alg, &test.key.PublicKey) failIfErr(b, err) b.Run("check-"+test.alg.String(), func(b *testing.B) { for i := 0; i < b.N; i++ { @@ -164,43 +164,43 @@ func Benchmark_cristalhq_jwt_ECDSA(b *testing.B) { } } -var pascaldekloe_jwt_benchClaims = &pascaldekloe_jwt.Claims{ - Registered: pascaldekloe_jwt.Registered{ +var pascaldekloe_benchClaims = &pascaldekloe.Claims{ + Registered: pascaldekloe.Registered{ Issuer: "benchmark", - Issued: pascaldekloe_jwt.NewNumericTime(time.Now()), + Issued: pascaldekloe.NewNumericTime(time.Now()), }, } -func Benchmark_pascaldekloe_jwt_EdDSA(b *testing.B) { - b.Run("sign-"+pascaldekloe_jwt.EdDSA, func(b *testing.B) { +func Benchmark_pascaldekloe_EdDSA(b *testing.B) { + b.Run("sign-"+pascaldekloe.EdDSA, func(b *testing.B) { var tokenLen int for i := 0; i < b.N; i++ { - token, err := pascaldekloe_jwt_benchClaims.EdDSASign(testKeyEd25519Private) + token, err := pascaldekloe_benchClaims.EdDSASign(testKeyEd25519Private) failIfErr(b, err) tokenLen += len(token) } b.ReportMetric(float64(tokenLen)/float64(b.N), "B/token") }) - b.Run("check-"+pascaldekloe_jwt.EdDSA, func(b *testing.B) { - token, err := pascaldekloe_jwt_benchClaims.EdDSASign(testKeyEd25519Private) + b.Run("check-"+pascaldekloe.EdDSA, func(b *testing.B) { + token, err := pascaldekloe_benchClaims.EdDSASign(testKeyEd25519Private) failIfErr(b, err) for i := 0; i < b.N; i++ { - _, err := pascaldekloe_jwt.EdDSACheck(token, testKeyEd25519Public) + _, err := pascaldekloe.EdDSACheck(token, testKeyEd25519Public) failIfErr(b, err) } }) } -func Benchmark_pascaldekloe_jwt_HMAC(b *testing.B) { - algs := []string{pascaldekloe_jwt.HS256, pascaldekloe_jwt.HS384, pascaldekloe_jwt.HS512} +func Benchmark_pascaldekloe_HMAC(b *testing.B) { + algs := []string{pascaldekloe.HS256, pascaldekloe.HS384, pascaldekloe.HS512} for _, alg := range algs { b.Run("sign-"+alg, func(b *testing.B) { var tokenLen int for i := 0; i < b.N; i++ { - token, err := pascaldekloe_jwt_benchClaims.HMACSign(alg, keysHMAC) + token, err := pascaldekloe_benchClaims.HMACSign(alg, keysHMAC) failIfErr(b, err) tokenLen += len(token) } @@ -209,26 +209,26 @@ func Benchmark_pascaldekloe_jwt_HMAC(b *testing.B) { } for _, alg := range algs { - token, err := pascaldekloe_jwt_benchClaims.HMACSign(alg, keysHMAC) + token, err := pascaldekloe_benchClaims.HMACSign(alg, keysHMAC) failIfErr(b, err) b.Run("check-"+alg, func(b *testing.B) { for i := 0; i < b.N; i++ { - _, err := pascaldekloe_jwt.HMACCheck(token, keysHMAC) + _, err := pascaldekloe.HMACCheck(token, keysHMAC) failIfErr(b, err) } }) } } -func Benchmark_pascaldekloe_jwt_RSA(b *testing.B) { +func Benchmark_pascaldekloe_RSA(b *testing.B) { keys := []*rsa.PrivateKey{testKeyRSA1024, testKeyRSA2048, testKeyRSA4096} for _, key := range keys { b.Run(fmt.Sprintf("sign-%d-bit", key.Size()*8), func(b *testing.B) { var tokenLen int for i := 0; i < b.N; i++ { - token, err := pascaldekloe_jwt_benchClaims.RSASign(pascaldekloe_jwt.RS384, key) + token, err := pascaldekloe_benchClaims.RSASign(pascaldekloe.RS384, key) failIfErr(b, err) tokenLen += len(token) } @@ -237,33 +237,33 @@ func Benchmark_pascaldekloe_jwt_RSA(b *testing.B) { } for _, key := range keys { - token, err := pascaldekloe_jwt_benchClaims.RSASign(pascaldekloe_jwt.RS384, key) + token, err := pascaldekloe_benchClaims.RSASign(pascaldekloe.RS384, key) failIfErr(b, err) b.Run(fmt.Sprintf("check-%d-bit", key.Size()*8), func(b *testing.B) { for i := 0; i < b.N; i++ { - _, err := pascaldekloe_jwt.RSACheck(token, &key.PublicKey) + _, err := pascaldekloe.RSACheck(token, &key.PublicKey) failIfErr(b, err) } }) } } -func Benchmark_pascaldekloe_jwt_ECDSA(b *testing.B) { +func Benchmark_pascaldekloe_ECDSA(b *testing.B) { tests := []struct { key *ecdsa.PrivateKey alg string }{ - {testKeyEC256, pascaldekloe_jwt.ES256}, - {testKeyEC384, pascaldekloe_jwt.ES384}, - {testKeyEC521, pascaldekloe_jwt.ES512}, + {testKeyEC256, pascaldekloe.ES256}, + {testKeyEC384, pascaldekloe.ES384}, + {testKeyEC521, pascaldekloe.ES512}, } for _, test := range tests { b.Run("sign-"+test.alg, func(b *testing.B) { var tokenLen int for i := 0; i < b.N; i++ { - token, err := pascaldekloe_jwt_benchClaims.ECDSASign(test.alg, test.key) + token, err := pascaldekloe_benchClaims.ECDSASign(test.alg, test.key) failIfErr(b, err) tokenLen += len(token) } @@ -272,34 +272,34 @@ func Benchmark_pascaldekloe_jwt_ECDSA(b *testing.B) { } for _, test := range tests { - token, err := pascaldekloe_jwt_benchClaims.ECDSASign(test.alg, test.key) + token, err := pascaldekloe_benchClaims.ECDSASign(test.alg, test.key) failIfErr(b, err) b.Run("check-"+test.alg, func(b *testing.B) { for i := 0; i < b.N; i++ { - _, err := pascaldekloe_jwt.ECDSACheck(token, &test.key.PublicKey) + _, err := pascaldekloe.ECDSACheck(token, &test.key.PublicKey) failIfErr(b, err) } }) } } -var golang_jwt_jwt_benchClaims = &golang_jwt_jwt.StandardClaims{ +var golang_jwt_benchClaims = &golang_jwt.StandardClaims{ Issuer: "benchmark", IssuedAt: time.Now().Unix(), } -func Benchmark_golang_jwt_jwt_EdDSA(b *testing.B) {} +func Benchmark_golang_jwt_EdDSA(b *testing.B) {} -func Benchmark_golang_jwt_jwt_HMAC(b *testing.B) { - algs := []golang_jwt_jwt.SigningMethod{ - golang_jwt_jwt.SigningMethodHS256, - golang_jwt_jwt.SigningMethodHS384, - golang_jwt_jwt.SigningMethodHS512, +func Benchmark_golang_jwt_HMAC(b *testing.B) { + algs := []golang_jwt.SigningMethod{ + golang_jwt.SigningMethodHS256, + golang_jwt.SigningMethodHS384, + golang_jwt.SigningMethodHS512, } for _, alg := range algs { - token := golang_jwt_jwt.NewWithClaims(alg, golang_jwt_jwt_benchClaims) + token := golang_jwt.NewWithClaims(alg, golang_jwt_benchClaims) b.Run("sign-"+alg.Alg(), func(b *testing.B) { var tokenLen int @@ -313,13 +313,13 @@ func Benchmark_golang_jwt_jwt_HMAC(b *testing.B) { } for _, alg := range algs { - token := golang_jwt_jwt.NewWithClaims(alg, golang_jwt_jwt_benchClaims) + token := golang_jwt.NewWithClaims(alg, golang_jwt_benchClaims) tokenStr, err := token.SignedString(keysHMAC) failIfErr(b, err) b.Run("check-"+alg.Alg(), func(b *testing.B) { for i := 0; i < b.N; i++ { - token, err := golang_jwt_jwt.Parse(tokenStr, func(token *golang_jwt_jwt.Token) (interface{}, error) { + token, err := golang_jwt.Parse(tokenStr, func(token *golang_jwt.Token) (interface{}, error) { return keysHMAC, nil }) if err != nil || !token.Valid { @@ -330,9 +330,9 @@ func Benchmark_golang_jwt_jwt_HMAC(b *testing.B) { } } -func Benchmark_golang_jwt_jwt_RSA(b *testing.B) { +func Benchmark_golang_jwt_RSA(b *testing.B) { for _, key := range keysRSA { - token := golang_jwt_jwt.NewWithClaims(golang_jwt_jwt.SigningMethodRS384, golang_jwt_jwt_benchClaims) + token := golang_jwt.NewWithClaims(golang_jwt.SigningMethodRS384, golang_jwt_benchClaims) b.Run(fmt.Sprintf("sign-%d-bit", key.Size()*8), func(b *testing.B) { var tokenLen int @@ -346,13 +346,13 @@ func Benchmark_golang_jwt_jwt_RSA(b *testing.B) { } for _, key := range keysRSA { - token := golang_jwt_jwt.NewWithClaims(golang_jwt_jwt.SigningMethodRS384, golang_jwt_jwt_benchClaims) + token := golang_jwt.NewWithClaims(golang_jwt.SigningMethodRS384, golang_jwt_benchClaims) tokenStr, err := token.SignedString(key) failIfErr(b, err) b.Run(fmt.Sprintf("check-%d-bit", key.Size()*8), func(b *testing.B) { for i := 0; i < b.N; i++ { - token, err := golang_jwt_jwt.Parse(tokenStr, func(token *golang_jwt_jwt.Token) (interface{}, error) { + token, err := golang_jwt.Parse(tokenStr, func(token *golang_jwt.Token) (interface{}, error) { return &key.PublicKey, nil }) failIfErr(b, err) @@ -364,18 +364,18 @@ func Benchmark_golang_jwt_jwt_RSA(b *testing.B) { } } -func Benchmark_golang_jwt_jwt_ECDSA(b *testing.B) { +func Benchmark_golang_jwt_ECDSA(b *testing.B) { tests := []struct { key *ecdsa.PrivateKey - alg *golang_jwt_jwt.SigningMethodECDSA + alg *golang_jwt.SigningMethodECDSA }{ - {keysECDSA[0], golang_jwt_jwt.SigningMethodES256}, - {keysECDSA[1], golang_jwt_jwt.SigningMethodES384}, - {keysECDSA[2], golang_jwt_jwt.SigningMethodES512}, + {keysECDSA[0], golang_jwt.SigningMethodES256}, + {keysECDSA[1], golang_jwt.SigningMethodES384}, + {keysECDSA[2], golang_jwt.SigningMethodES512}, } for _, test := range tests { - token := golang_jwt_jwt.NewWithClaims(test.alg, golang_jwt_jwt_benchClaims) + token := golang_jwt.NewWithClaims(test.alg, golang_jwt_benchClaims) b.Run(fmt.Sprintf("sign-%d-bit", test.key.Params().BitSize), func(b *testing.B) { var tokenLen int @@ -389,13 +389,13 @@ func Benchmark_golang_jwt_jwt_ECDSA(b *testing.B) { } for _, test := range tests { - token := golang_jwt_jwt.NewWithClaims(test.alg, golang_jwt_jwt_benchClaims) + token := golang_jwt.NewWithClaims(test.alg, golang_jwt_benchClaims) tokenStr, err := token.SignedString(test.key) failIfErr(b, err) b.Run(fmt.Sprintf("check-%d-bit", test.key.Params().BitSize), func(b *testing.B) { for i := 0; i < b.N; i++ { - token, err := golang_jwt_jwt.Parse(tokenStr, func(token *golang_jwt_jwt.Token) (interface{}, error) { + token, err := golang_jwt.Parse(tokenStr, func(token *golang_jwt.Token) (interface{}, error) { return &test.key.PublicKey, nil }) failIfErr(b, err) @@ -407,4 +407,4 @@ func Benchmark_golang_jwt_jwt_ECDSA(b *testing.B) { } } -var lestrrat_go_jwx_benchClaims = lestrrat_go_jwx.DecoderSettings +var lestrrat_go_benchClaims = lestrrat_go.DecoderSettings diff --git a/qrcode/bench.txt b/qrcode/bench.txt index 0217bba..53d4e82 100644 --- a/qrcode/bench.txt +++ b/qrcode/bench.txt @@ -1,34 +1,34 @@ goos: darwin goarch: arm64 pkg: github.com/cristalhq/benchmarks/qrcode -Benchmark_cristalhq_qrcode -Benchmark_cristalhq_qrcode-10 81516 12597 ns/op 23648 B/op 23 allocs/op -Benchmark_cristalhq_qrcode-10 94460 12476 ns/op 23648 B/op 23 allocs/op -Benchmark_cristalhq_qrcode-10 96574 12447 ns/op 23648 B/op 23 allocs/op -Benchmark_cristalhq_qrcode-10 96430 12513 ns/op 23648 B/op 23 allocs/op -Benchmark_cristalhq_qrcode-10 95835 12467 ns/op 23648 B/op 23 allocs/op -Benchmark_rsc_qr -Benchmark_rsc_qr-10 90033 13231 ns/op 25629 B/op 32 allocs/op -Benchmark_rsc_qr-10 90102 13233 ns/op 25628 B/op 32 allocs/op -Benchmark_rsc_qr-10 90963 13283 ns/op 25628 B/op 32 allocs/op -Benchmark_rsc_qr-10 90224 13259 ns/op 25628 B/op 32 allocs/op -Benchmark_rsc_qr-10 91130 13277 ns/op 25629 B/op 32 allocs/op -Benchmark_yeqown_go_qrcode -Benchmark_yeqown_go_qrcode-10 1558 763854 ns/op 2946564 B/op 3377 allocs/op -Benchmark_yeqown_go_qrcode-10 1568 771234 ns/op 2946561 B/op 3377 allocs/op -Benchmark_yeqown_go_qrcode-10 1534 776270 ns/op 2946558 B/op 3377 allocs/op -Benchmark_yeqown_go_qrcode-10 1532 771639 ns/op 2946423 B/op 3377 allocs/op -Benchmark_yeqown_go_qrcode-10 1531 771569 ns/op 2946441 B/op 3377 allocs/op +Benchmark_cristalhq +Benchmark_cristalhq-10 81516 12597 ns/op 23648 B/op 23 allocs/op +Benchmark_cristalhq-10 94460 12476 ns/op 23648 B/op 23 allocs/op +Benchmark_cristalhq-10 96574 12447 ns/op 23648 B/op 23 allocs/op +Benchmark_cristalhq-10 96430 12513 ns/op 23648 B/op 23 allocs/op +Benchmark_cristalhq-10 95835 12467 ns/op 23648 B/op 23 allocs/op +Benchmark_rsc +Benchmark_rsc-10 90033 13231 ns/op 25629 B/op 32 allocs/op +Benchmark_rsc-10 90102 13233 ns/op 25628 B/op 32 allocs/op +Benchmark_rsc-10 90963 13283 ns/op 25628 B/op 32 allocs/op +Benchmark_rsc-10 90224 13259 ns/op 25628 B/op 32 allocs/op +Benchmark_rsc-10 91130 13277 ns/op 25629 B/op 32 allocs/op +Benchmark_yeqown +Benchmark_yeqown-10 1558 763854 ns/op 2946564 B/op 3377 allocs/op +Benchmark_yeqown-10 1568 771234 ns/op 2946561 B/op 3377 allocs/op +Benchmark_yeqown-10 1534 776270 ns/op 2946558 B/op 3377 allocs/op +Benchmark_yeqown-10 1532 771639 ns/op 2946423 B/op 3377 allocs/op +Benchmark_yeqown-10 1531 771569 ns/op 2946441 B/op 3377 allocs/op Benchmark_boombuler_barcode Benchmark_boombuler_barcode-10 685 1726112 ns/op 129302 B/op 755 allocs/op Benchmark_boombuler_barcode-10 696 1728505 ns/op 129313 B/op 755 allocs/op Benchmark_boombuler_barcode-10 690 1724337 ns/op 129316 B/op 755 allocs/op Benchmark_boombuler_barcode-10 694 1724463 ns/op 129312 B/op 755 allocs/op Benchmark_boombuler_barcode-10 690 1728233 ns/op 129309 B/op 755 allocs/op -Benchmark_skip2_go_qrcode -Benchmark_skip2_go_qrcode-10 1945 604560 ns/op 355200 B/op 8268 allocs/op -Benchmark_skip2_go_qrcode-10 1976 602861 ns/op 355200 B/op 8268 allocs/op -Benchmark_skip2_go_qrcode-10 1981 603096 ns/op 355200 B/op 8268 allocs/op -Benchmark_skip2_go_qrcode-10 1963 602700 ns/op 355200 B/op 8268 allocs/op -Benchmark_skip2_go_qrcode-10 1971 602855 ns/op 355202 B/op 8268 allocs/op +Benchmark_skip2_go +Benchmark_skip2_go-10 1945 604560 ns/op 355200 B/op 8268 allocs/op +Benchmark_skip2_go-10 1976 602861 ns/op 355200 B/op 8268 allocs/op +Benchmark_skip2_go-10 1981 603096 ns/op 355200 B/op 8268 allocs/op +Benchmark_skip2_go-10 1963 602700 ns/op 355200 B/op 8268 allocs/op +Benchmark_skip2_go-10 1971 602855 ns/op 355202 B/op 8268 allocs/op PASS diff --git a/qrcode/bench_test.go b/qrcode/bench_test.go index 548a66f..dd90a00 100644 --- a/qrcode/bench_test.go +++ b/qrcode/bench_test.go @@ -4,16 +4,16 @@ import ( "math/rand" "testing" - boombuler_barcode "github.com/boombuler/barcode/qr" - cristalhq_qrcode "github.com/cristalhq/qrcode" - skip2_go_qrcode "github.com/skip2/go-qrcode" - yeqown_go_qrcode "github.com/yeqown/go-qrcode" - rsc_qr "rsc.io/qr" + boombuler "github.com/boombuler/barcode/qr" + cristalhq "github.com/cristalhq/qrcode" + skip2_go "github.com/skip2/go-qrcode" + yeqown "github.com/yeqown/go-qrcode" + rsc "rsc.io/qr" ) var benchURL = "otpauth://totp/Example:alice@bob.com?secret=JBSWY3DPEHPK3PXP&issuer=Example" -func Benchmark_cristalhq_qrcode(b *testing.B) { +func Benchmark_cristalhq(b *testing.B) { content := benchURL bitmap := make([]byte, 2500) @@ -23,7 +23,7 @@ func Benchmark_cristalhq_qrcode(b *testing.B) { var sink int64 for i := 0; i < b.N; i++ { - qr, err := cristalhq_qrcode.EncodeInto(bitmap, content, cristalhq_qrcode.M) + qr, err := cristalhq.EncodeInto(bitmap, content, cristalhq.M) checkErr(b, err) c := qr.Image().At(10, 10) @@ -33,7 +33,7 @@ func Benchmark_cristalhq_qrcode(b *testing.B) { sinkValue(sink) } -func Benchmark_rsc_qr(b *testing.B) { +func Benchmark_rsc(b *testing.B) { content := benchURL b.ReportAllocs() @@ -42,7 +42,7 @@ func Benchmark_rsc_qr(b *testing.B) { var sink int64 for i := 0; i < b.N; i++ { - qr, err := rsc_qr.Encode(content, rsc_qr.M) + qr, err := rsc.Encode(content, rsc.M) checkErr(b, err) c := qr.Image().At(10, 10) @@ -52,7 +52,7 @@ func Benchmark_rsc_qr(b *testing.B) { sinkValue(sink) } -func Benchmark_yeqown_go_qrcode(b *testing.B) { +func Benchmark_yeqown(b *testing.B) { content := benchURL b.ReportAllocs() @@ -61,7 +61,7 @@ func Benchmark_yeqown_go_qrcode(b *testing.B) { var sink int64 for i := 0; i < b.N; i++ { - code, err := yeqown_go_qrcode.New(content) + code, err := yeqown.New(content) checkErr(b, err) _ = code @@ -72,7 +72,7 @@ func Benchmark_yeqown_go_qrcode(b *testing.B) { sinkValue(sink) } -func Benchmark_boombuler_barcode(b *testing.B) { +func Benchmark_boombuler(b *testing.B) { content := benchURL b.ReportAllocs() @@ -81,7 +81,7 @@ func Benchmark_boombuler_barcode(b *testing.B) { var sink int64 for i := 0; i < b.N; i++ { - img, err := boombuler_barcode.Encode(content, boombuler_barcode.M, boombuler_barcode.Auto) + img, err := boombuler.Encode(content, boombuler.M, boombuler.Auto) checkErr(b, err) c := img.At(10, 10) @@ -91,7 +91,7 @@ func Benchmark_boombuler_barcode(b *testing.B) { sinkValue(sink) } -func Benchmark_skip2_go_qrcode(b *testing.B) { +func Benchmark_skip2_go(b *testing.B) { content := benchURL b.ReportAllocs() @@ -100,7 +100,7 @@ func Benchmark_skip2_go_qrcode(b *testing.B) { var sink int64 for i := 0; i < b.N; i++ { - qr, err := skip2_go_qrcode.New(content, skip2_go_qrcode.Medium) + qr, err := skip2_go.New(content, skip2_go.Medium) checkErr(b, err) c := qr.Image(256).At(10, 10)