some testing ang enchancments

This commit is contained in:
2026-02-06 13:46:09 +03:00
parent 948ac0a1b0
commit 4ba746956a
7 changed files with 286 additions and 94 deletions

23
map_test.go Normal file
View File

@@ -0,0 +1,23 @@
package extypes
import (
"fmt"
"testing"
)
func BenchmarkHashMap_Add(b *testing.B) {
b.StartTimer()
m := make(HashMap[string, string])
for i := 0; i < b.N; i++ {
m.Add(fmt.Sprint(i), fmt.Sprint(i))
}
b.StopTimer()
}
func BenchmarkGoMap_Add(b *testing.B) {
b.StartTimer()
m := make(map[string]string)
for i := 0; i < b.N; i++ {
m[fmt.Sprint(i)] = fmt.Sprint(i)
}
b.StopTimer()
}