fastcache icon indicating copy to clipboard operation
fastcache copied to clipboard

possible to remove the allocations? make it 0?

Open superdolt opened this issue 4 years ago • 4 comments

if cant remove the big cache, maybe the normal cache? there's 2allocs/op now... is it possible to remove it?

BenchmarkBigCacheSet-4 2000 10566656 ns/op 6.20 MB/s 4660369 B/op 6 allocs/op BenchmarkBigCacheGet-4 2000 6902694 ns/op 9.49 MB/s 684169 B/op 131076 allocs/op BenchmarkBigCacheSetGet-4 1000 17579118 ns/op 7.46 MB/s 5046744 B/op 131083 allocs/op BenchmarkCacheSet-4 5000 3808874 ns/op 17.21 MB/s 1142 B/op 2 allocs/op BenchmarkCacheGet-4 5000 3293849 ns/op 19.90 MB/s 1140 B/op 2 allocs/op BenchmarkCacheSetGet-4 2000 8456061 ns/op 15.50 MB/s 2857 B/op 5 allocs/op

superdolt avatar Jul 24 '21 18:07 superdolt

Is this a theoretical questions or a real obstacle? Can you clarify, please.

cristaloleg avatar Jul 24 '21 18:07 cristaloleg

real obstacle. hope to have complete zero allocation to the benchmark

superdolt avatar Jul 31 '21 19:07 superdolt

Can you be more precise, please? What is the problem with this allocs? how bad it's for you, so...just the details to better understand the case. Thank you.

cristaloleg avatar Jul 31 '21 19:07 cristaloleg

just garbage collection? 0 alloc/ op will not have any gc

superdolt avatar Jul 31 '21 20:07 superdolt