-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This implements differential rule applications as suggested in #1 As a side effect of implementing that optimization I also reduced the cased where LowRule needed to be cloned within the hot path. The reduction in clones made a small difference but differential rule applications had the greated effect. Before: ``` running 4 tests test ancestry::infer_ ... bench: 2,339,370 ns/iter (+/- 36,027) test ancestry::prove_ ... bench: 2,332,249 ns/iter (+/- 61,357) test recursion_minimal::infer_ ... bench: 35,339 ns/iter (+/- 1,012) test recursion_minimal::prove_ ... bench: 34,850 ns/iter (+/- 312) ``` After: ``` test ancestry::infer_ ... bench: 1,683,208 ns/iter (+/- 49,885) test ancestry::prove_ ... bench: 1,792,665 ns/iter (+/- 22,206) test recursion_minimal::infer_ ... bench: 17,601 ns/iter (+/- 457) test recursion_minimal::prove_ ... bench: 23,608 ns/iter (+/- 677) ``` We see a ~24% improvment for the 20 node ancestry test case. The percentage improvement becomes larger as node count increases. The previous version was too slow to even include a benchmark with larger node count (I lost patience waiting.). The new version is fast enough to scale to larger node counts so I've added another couple larger benchmarks in this commit: `ancestry::infer_30` and `test ancestry::prove_30`
- Loading branch information
Showing
5 changed files
with
215 additions
and
78 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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