-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
performanceCan possibly improve performanceCan possibly improve performance
Description
We currently use two separate slices for the bit vector and collision vector:
// bcVector represents a combined bit and collision vector.
type bcVector struct {
v []uint64
c []uint64
}This could lead to cache misses on every access.
Here are two ideas we could try.
- Option 1: Use a single slice to represent the bit and collision vector. See below.
- Option 2: Make sure each vector is small enough to fit in cache (use fixed-size array).
- This could be done by picking the number of partitions to make each partition fit exactly in the cache.
- We can create partitions that scale with the number of chunks instead of partition size.
- Add more levels since each level can fit only a fixed number of bits. This may slow down
Find, since it may need to traverse more levels.
For Option 1, instead of using:
b.v[x]
b.c[x]We can do this:
bc[x]
bc[x+1](Calculating x will be more complicated though.)
Metadata
Metadata
Assignees
Labels
performanceCan possibly improve performanceCan possibly improve performance