Skip to content

Commit

Permalink
Merge pull request #127 from input-output-hk/bloom-cleanup
Browse files Browse the repository at this point in the history
Refactor bloomfilter sublibrary
  • Loading branch information
dcoutts authored Mar 19, 2024
2 parents 599ca64 + 232a776 commit 0a8b9ec
Show file tree
Hide file tree
Showing 35 changed files with 1,395 additions and 1,022 deletions.
6 changes: 3 additions & 3 deletions bench/macro/Bench/Database/LSMTree/Internal/BloomFilter.hs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ benchMakeCheapHashes !_ !_ 0 = ()
benchMakeCheapHashes !bs !rng !n =
let k :: Word256
(!k, !rng') = uniform rng
!kh = Bloom.makeCheapHashes (serialiseKey k)
!kh = Bloom.makeHashes (serialiseKey k) :: Bloom.CheapHashes SerialisedKey
in kh `seq` benchMakeCheapHashes bs rng' (n-1)

-- | This gives us a combined cost of calculating the series of keys, their
Expand All @@ -240,7 +240,7 @@ benchElemCheapHashes !_ !_ 0 = ()
benchElemCheapHashes !bs !rng !n =
let k :: Word256
(!k, !rng') = uniform rng
!kh = Bloom.makeCheapHashes (serialiseKey k)
in foldl' (\_ b -> Bloom.elemCheapHashes kh b `seq` ()) () bs
!kh = Bloom.makeHashes (serialiseKey k)
in foldl' (\_ b -> Bloom.elemHashes kh b `seq` ()) () bs
`seq` benchElemCheapHashes bs rng' (n-1)

9 changes: 0 additions & 9 deletions bloomfilter/CHANGELOG.md

This file was deleted.

343 changes: 0 additions & 343 deletions bloomfilter/Data/BloomFilter.hs

This file was deleted.

Loading

0 comments on commit 0a8b9ec

Please sign in to comment.