-
Notifications
You must be signed in to change notification settings - Fork 116
Open
Description
Hello,
How can I calculate memory footprint of the cuckoo filter, I am creating.
I am benchmarking this implementation against bloom filter here:
What I am interested is
- Time taken to insert 500,000 strings
- Time taken to lookup 1.000,000 strings, out of which 500,000 are the inserted above. So FP will be checked as well
- Memory footprint
So I need to know how much memory the
type CuckooFilter struct {
buckets []bucket
count uint
}
consumes.
What I am trying:
func (cf *CuckooFilter)GetSize() uintptr {
return unsafe.Sizeof(cf.count) + unsafe.Sizeof(cf.buckets) + uintptr(len(cf.buckets) * 24) + uintptr(len(cf.buckets) * 24 *4)
}
It is shown to be 15mb, may be because each slice element in golang takes 24 bytes additional.
Metadata
Metadata
Assignees
Labels
No labels