update go version so we can use the new benchmarking helper.

This commit is contained in:
fiatjaf
2025-03-13 18:57:28 -03:00
parent 1b610ba318
commit 4dcadd4d88
4 changed files with 6 additions and 29 deletions

View File

@@ -104,13 +104,13 @@ func BenchmarkIDCheck(b *testing.B) {
evt.Sign(GeneratePrivateKey())
b.Run("naïve", func(b *testing.B) {
for i := 0; i < b.N; i++ {
for b.Loop() {
_ = evt.GetID() == evt.ID
}
})
b.Run("big brain", func(b *testing.B) {
for i := 0; i < b.N; i++ {
for b.Loop() {
_ = evt.CheckID()
}
})