Repository navigation
datalog: load takes a run of facts of one relation with one lookup and one insert - #71
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
D.loadtook each input fact with its own relation id lookup (D.internId, a scan of the relation table), its ownD.relOf, and its own insert of the relation back into therelsIMap. A callgrind run of a normal s2c compile putD.loadat 14% of all instructions.Now
D.loadtakes a run of consecutive facts of one relation with one id lookup, onerelOfand one insert. The loop is one self tail call over aD.Loadingstate (a mutual tail call is no C loop), and the rows go into each relation in the same order as before, so every relation and the relation ids are the same.Measured on s2c compiling itself, both compilers on the same input (
perf stat -e instructions:u, twice each):--memChecks:
--memon s2c is byte-identical.Mutants (one sed line in a copy of s2/datalog.srs; the component tests built from the mutant sources):
unreach(e)lost), flow, dprov