allegro / allegro/bigcache-bench

Not sure what is wrong but it a bit slow.

Abierto
#9 3 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Go
Estrellas
20
Forks
11
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

```
BenchmarkLRUByteHashSet-12 53083549 22.0 ns/op 5 B/op 0 allocs/op
BenchmarkLRUSet-12 12577149 96.6 ns/op 106 B/op 3 allocs/op
BenchmarkBigCacheSet-12 9351686 126 ns/op 71 B/op 0 allocs/op
BenchmarkLRUByteHashGet-12 107372199 11.0 ns/op 2 B/op 0 allocs/op
BenchmarkLRUGet-12 59989704 20.1 ns/op 5 B/op 0 allocs/op
BenchmarkBigCacheGet-12 18905139 63.2 ns/op 2 B/op 2 allocs/op
```

```go
func BenchmarkBigCacheGet(b *testing.B) {
cache, _ := bigcache.NewBigCache(bigcache.Config{
Shards: 256,
LifeWindow: 10 * time.Minute,
MaxEntrySize: 256,
Verbose: false,
})
cache.Set("1", []byte("1"))
for n := 0; n < b.N; n++ {
cache.Get("1")
}
}
func BenchmarkBigCacheSet(b *testing.B) {
cache, _ := bigcache.NewBigCache(bigcache.Config{
Shards: 256,
LifeWindow: 10 * time.Minute,
MaxEntrySize: 256,
Verbose: false,
})
for n := 0; n < b.N; n++ {
cache.Set("1", []byte("1"))
}
}
```

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.