-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Batched lookups in IO #102
Conversation
84ce2c5
to
cb744e8
Compare
cb744e8
to
3473825
Compare
GHA fails on ghc's before 9.6. It should be fixed after incorporating well-typed/quickcheck-lockstep#19 Relevant GHA run: https://github.com/input-output-hk/lsm-tree/actions/runs/7994908218/job/21834042035?pr=102 |
ac4589f
to
13da88d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a few thoughts, since I encountered many similar situations with run merging.
cf4912f
to
c6fc7c8
Compare
6d096f1
to
62c96b6
Compare
fcdf61e
to
de472c9
Compare
62c96b6
to
f10c992
Compare
0d63c5f
to
0a09e81
Compare
f10c992
to
1e14a05
Compare
1e14a05
to
5befdd0
Compare
b328e2d
to
eb82d81
Compare
5befdd0
to
65dd89b
Compare
6f9675b
to
503a350
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(not done yet, just want these comments to be visible already)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm part way through. Not looked at the tests yet.
2469762
to
32d5938
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of my comments are:
- suggestions for the benchmark, which can still be done later, or you could even move the whole benchmark to a follow-up PR
- notes and ideas on the main lookup code, which you might like or not, in which case you can safely discard them
So most things are not a blocker, but before merging it would be good to at least add some TODOs and ideally avoid the export of Run.close
.
lookupss = concatMap lookups dats | ||
|
||
opaqueifyBlobs :: V.Vector (k, Maybe (Entry v b)) -> V.Vector (k, Maybe (Entry v Opaque)) | ||
opaqueifyBlobs = fmap (fmap (fmap (fmap Opaque))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
peak Haskell 🏆
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait until you meet their cousin...
opaqueifyBlobs :: V.Vector (k, Maybe (Entry v b)) -> V.Vector (k, Maybe (Entry v Opaque))
opaqueifyBlobs = getCompose . getCompose . getCompose . fmap Opaque . Compose . Compose . Compose
32d5938
to
c9ad667
Compare
* New lookupInBatches function that prepare lookups using prepLookups, submits them to a HasBlockIO interface, extracts results from pages, and combines them. * Adapt micro-benchmarks to include lookupsInBatches, in addition to prepLookups, indexSearches and bloomQueries. * Add round-trip test for lookupInBatches * Change prepLookups code to receive multiple vectors, instead of a vector of sums. * Remove unused uniformWithoutReplacement' function
c9ad667
to
575c796
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks ready to me!
No description provided.