@@ -289,7 +289,6 @@ func BenchmarkMapSet(b *testing.B) {
289289 m := NewMap [int ]()
290290 key := []byte ("benchmark-key" )
291291
292- b .ResetTimer ()
293292 for b .Loop () {
294293 m .Set (key , 123 )
295294 }
@@ -301,7 +300,6 @@ func BenchmarkMapGet(b *testing.B) {
301300 key := []byte ("benchmark-key" )
302301 m .Set (key , 123 )
303302
304- b .ResetTimer ()
305303 for b .Loop () {
306304 m .Get (key )
307305 }
@@ -503,7 +501,6 @@ func BenchmarkLRUSet(b *testing.B) {
503501 l , _ := NewLRU [int ](10000 )
504502 key := []byte ("benchmark-key" )
505503
506- b .ResetTimer ()
507504 for b .Loop () {
508505 l .Set (key , 123 )
509506 }
@@ -515,7 +512,6 @@ func BenchmarkLRUGet(b *testing.B) {
515512 key := []byte ("benchmark-key" )
516513 l .Set (key , 123 )
517514
518- b .ResetTimer ()
519515 for b .Loop () {
520516 l .Get (key )
521517 }
@@ -553,7 +549,6 @@ func BenchmarkMaphashMapSet(b *testing.B) {
553549 m := NewMap [int ]()
554550 key := []byte ("benchmark-key-that-is-48-bytes-long-like-pubkey!" )
555551
556- b .ResetTimer ()
557552 for b .Loop () {
558553 m .Set (key , 123 )
559554 }
@@ -563,7 +558,6 @@ func BenchmarkStringMapSet(b *testing.B) {
563558 m := NewStringMap [int ]()
564559 key := []byte ("benchmark-key-that-is-48-bytes-long-like-pubkey!" )
565560
566- b .ResetTimer ()
567561 for b .Loop () {
568562 m .Set (key , 123 )
569563 }
@@ -577,7 +571,6 @@ func BenchmarkMaphashMapGet(b *testing.B) {
577571 key := []byte ("benchmark-key-that-is-48-bytes-long-like-pubkey!" )
578572 m .Set (key , 123 )
579573
580- b .ResetTimer ()
581574 for b .Loop () {
582575 m .Get (key )
583576 }
@@ -588,7 +581,6 @@ func BenchmarkStringMapGet(b *testing.B) {
588581 key := []byte ("benchmark-key-that-is-48-bytes-long-like-pubkey!" )
589582 m .Set (key , 123 )
590583
591- b .ResetTimer ()
592584 for b .Loop () {
593585 m .Get (key )
594586 }
@@ -609,7 +601,6 @@ func BenchmarkMaphashMapSetManyKeys(b *testing.B) {
609601 keys [i ][3 ] = byte (i )
610602 }
611603
612- b .ResetTimer ()
613604 i := 0
614605 for b .Loop () {
615606 m := NewMap [int ]()
@@ -631,7 +622,6 @@ func BenchmarkStringMapSetManyKeys(b *testing.B) {
631622 keys [i ][3 ] = byte (i )
632623 }
633624
634- b .ResetTimer ()
635625 i := 0
636626 for b .Loop () {
637627 m := NewStringMap [int ]()
@@ -653,7 +643,6 @@ func BenchmarkUniqueHandleMapSetManyKeys(b *testing.B) {
653643 keys [i ][3 ] = byte (i )
654644 }
655645
656- b .ResetTimer ()
657646 i := 0
658647 for b .Loop () {
659648 m := NewUniqueHandleMap [int ]()
@@ -681,7 +670,6 @@ func BenchmarkMaphashMapGetManyKeys(b *testing.B) {
681670 m .Set (keys [i ], i )
682671 }
683672
684- b .ResetTimer ()
685673 i := 0
686674 for b .Loop () {
687675 m .Get (keys [i % len (keys )])
@@ -703,7 +691,6 @@ func BenchmarkStringMapGetManyKeys(b *testing.B) {
703691 m .Set (keys [i ], i )
704692 }
705693
706- b .ResetTimer ()
707694 i := 0
708695 for b .Loop () {
709696 m .Get (keys [i % len (keys )])
@@ -769,7 +756,6 @@ func BenchmarkUniqueHandleMapSet(b *testing.B) {
769756 m := NewUniqueHandleMap [int ]()
770757 key := []byte ("benchmark-key-that-is-48-bytes-long-like-pubkey!" )
771758
772- b .ResetTimer ()
773759 for b .Loop () {
774760 m .Set (key , 123 )
775761 }
@@ -780,7 +766,6 @@ func BenchmarkUniqueHandleMapGet(b *testing.B) {
780766 key := []byte ("benchmark-key-that-is-48-bytes-long-like-pubkey!" )
781767 m .Set (key , 123 )
782768
783- b .ResetTimer ()
784769 for b .Loop () {
785770 m .Get (key )
786771 }
@@ -800,7 +785,6 @@ func BenchmarkUniqueHandleMapGetManyKeys(b *testing.B) {
800785 m .Set (keys [i ], i )
801786 }
802787
803- b .ResetTimer ()
804788 i := 0
805789 for b .Loop () {
806790 m .Get (keys [i % len (keys )])
0 commit comments