Open bddap opened 3 years ago
Initial experiments adding rayon.
ancestry benchmark, AMD Ryzen 9 3900X 12-Core Processor (24 logical cores), 50 entities
24 rules (22 of them duplicates) | 2 rules | |
---|---|---|
single threaded | 294,074,410 ns/iter | 20,142,490 ns/iter |
rayon version | 51,397,531 ns/iter | 12,489,231 ns/iter |
Looks like, the parallel implementation improves performance when rule count is high, otherwise it hiders performance.
Better to work on https://github.com/docknetwork/rify/issues/1 first.
Better to work on #9 before working on this.
During each single round of reasoning, the RDF store does not receive writes. Instead, new inferences are queued for addition. This structure should lend itself well to a multi threaded reasoner. Each rule can be processed by a separate thread. Once all rules are processed for a round, merge all resulting inferences together an insert them into the RDF store.
Maybe work can be split up more granularly than per-rule but perhaps not worth the complexity.