a8m / a8m/syncmap

The case BenchmarkRange seems has some problem ?

Abierto
#10 1 comentario 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Go
Estrellas
256
Forks
17
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

```
// syncmap code:
b.Run(fmt.Sprintf("%T", &IntMap{}), func(b *testing.B) {
m := &IntMap{}
// setup:

// reset:
b.ResetTimer()

// perG:
perG := func(b *testing.B, pb *testing.PB, i int, m *IntMap) {
for ; pb.Next(); i++ {
m.Range(func(_, _ int) bool { return true })
}
}
var i int64
b.RunParallel(func(pb *testing.PB) {
id := int(atomic.AddInt64(&i, 1) - 1)
perG(b, pb, id*b.N, m)
})
})
```

seems the setup function is nil, then the map is empy, so at the benrchmark result, it seems vary fast

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.