allegro / allegro/bigcache-bench

Not sure what is wrong but it a bit slow.

Ouverte
#9 3 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Go
Étoiles
20
Forks
11
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

```
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"))
}
}
```

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.