Skip to content

Searcher checkpoints#21

Merged
maxitg merged 4 commits intomasterfrom
feature/searcherCheckpoints
Mar 1, 2021
Merged

Searcher checkpoints#21
maxitg merged 4 commits intomasterfrom
feature/searcherCheckpoints

Conversation

@maxitg
Copy link
Copy Markdown
Owner

@maxitg maxitg commented Mar 1, 2021

Changes

  • PostTagSearcher now uses explicit checkpoints from EvaluationParameters.
  • The trie from explicit checkpoints is only constructed once and shared across all inputs.
  • There is a separate trie for automatic checkpoints which is unique to each input.

Comments

  • We might want to share the automatic checkpoints trie in the future as well, but that will require storing checkpoints source in the trie itself (to distinguish between "ReachedCycle" and "MergedWithAnotherInput") conclusions.

Examples

  • The following produces 6 outputs, in which 0th and 3rd reach the provided checkpoint:
PostTagSearcher::EvaluationParameters parameters;
parameters.checkpoints = {{{0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0}, 2}};
const auto result = PostTagSearcher().evaluateRange(20, 123, 125, parameters);

This change is Reviewable

@maxitg maxitg added the enhancement New feature or request label Mar 1, 2021
@maxitg maxitg mentioned this pull request Mar 1, 2021
@okofish
Copy link
Copy Markdown
Collaborator

okofish commented Mar 1, 2021

Seems file although I didn't look at the implementation closely. I confirmed the results from your example through the input/output pipeline:
image

okofish
okofish approved these changes Mar 1, 2021
@maxitg maxitg merged commit 9c0122b into master Mar 1, 2021
@maxitg maxitg deleted the feature/searcherCheckpoints branch March 1, 2021 18:33
maxitg added a commit that referenced this pull request Mar 1, 2021
## Changes

* `PostTagSearcher` now correctly uses the time constraint parameter.
* `ConclusionReason` will either be `TimeConstraintExceeded` or `NotEvaluated` based on whether the time constraint was reached before or during the evaluation of a particular init.

## Comments

* Checkpoints #21 should be merged first.
* The time constraint will be exceeded slightly because results need to be collected.

## Examples

* The first result of the following concludes with reason `TimeConstraintExceeded`:
```c++
PostTagSearcher::EvaluationParameters parameters;
parameters.groupTimeConstraintNs = 100000000;  // 0.1 seconds
const auto result = PostTagSearcher().evaluateRange(
    64, 1473593303835332608, 1473593303835332609, parameters);
```
* The other two results are `NotEvaluated` for now, but that can change after parallelization is implemented.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants