Skip to content
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

Indexed FinFunctions and hash joins #355

Merged
merged 9 commits into from
Dec 15, 2020

Conversation

epatters
Copy link
Member

@epatters epatters commented Dec 13, 2020

This PR:

  • Add types for FinFunctions and FinDomFunctions with indices, so that preimages can be efficiently computed
  • Implements the hash join algorithm for binary pullbacks/two-way joins
  • Adds benchmarks for three pullback/join algorithms we now support, namely nested loop joins, sort-merge joins, and hash joins

As expected by their asymptotic complexity, both the sort-merge join and hash join are way faster than the naive algorithm, the nested loop join. At least in these benchmarks, the hash join is generally a bit faster than the sort-merge join. Note that this includes the time for computing the indices; when used with the pre-indexed functions coming from C-sets, the performance of hash joins should be even better.

The codomain defaults to `TypeSet(T)` for the appropriate `T`.
Also, add function `is_indexed`.
Don't export the underlying concrete types. Also, add pretty-printing
for indexed functions.
Multiway hash joins are not yet supported.
Mainly for the sake of accurate comparison with other join algorithms.
This departs from the convention used in C-set indices but the sorting
is irrelevant in hash joins, the main application of these indices.
@epatters epatters merged commit 67524d3 into AlgebraicJulia:master Dec 15, 2020
@epatters epatters deleted the indexed-fin-functions branch December 15, 2020 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant