-
Notifications
You must be signed in to change notification settings - Fork 13
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
Performance issues with with
et. al
#8
Comments
I fully anticipate that tables is about half the speed it could be given a more robust implementation than just deleting all the things and reinserting them. Your performance numbers seem to be about what I'd expect. That is the trade-off for the nicer API. We might be able to do much better if we replaced all of the Note: instance Functor (Const a) where
fmap _ (Const a) = Const a When you use Another aspect that could lead to better performance would be to enable |
Yeah, it seems that most of the time is spent creating the table from the list of 'selected' elements ( As a proof of concept, I have added lens based interface to data-store and, as expected, the performance sunk considerably indeed. I have not yet measured the performance after the commit Taneb pushed to tables few hours ago. By the way, data-store does not (yet) use (or makes it possible to use) |
Could there be a variant of myTable ^.. with' Fst (==) 10 and receive a list rather than a new table, avoiding the overhead of creating a new table. Obviously this isn't as compositional as |
I don't have a particular objection to adding it, though it is a lot less compositional than the current approach. One option might be to make a couple of RULES that would let you extract
more efficiently. |
Hi, I have created a benchmark that compares the performance of data-store and tables.
What I found is that tables seems to have much worse performance than data-store when querying. I think the problem might be that
with
et. al not only select the matching elements from the table, but also create new table from these elements (which usesinsert
, which usesdeleteCollisions
which, as theinsert-collisions
benchmark indicates, also seems to be underperfoming).The problem might also be caused by the benchamark (or bug in data-store, but the results of the benchmarks seem to be the same for both packages), so I encourage everyone to take a look. (For anyone wondering, the
NFData
instance for tables comes from here)I am open to any and all suggestions.
The text was updated successfully, but these errors were encountered: