-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Exponential memory improvement by re-using NameState across multiple …
…patterns (#88) * Exponential memory improvement by re-using NameState across multiple patterns * Fixing errant change to ByteMatch * Adding some not-null checks * Fixing several bugs to make this change work * Fixing build after pulling in latest changes * Adding missing Test annotation * Fixing infinite loop bug in ACFinder * Fixing package name * Fixing anythingButs to use pattern as well as namestate * Optimizing NameState further by only storing IDs for non-terminal sub-rules * Keeping duplicate rules out of NameState * Version bump * Additional NameState re-use for case when sequence of keys has already been encountered * Fixing bug in determining newness of rules. Addressing some minor feedback from Long. * Revert "Additional NameState re-use for case when sequence of keys has already been encountered" This reverts commit d881815. * Performance improvements to rulesFor(JSON)Event * Fixing bug in tracking NameStates when adding steps
- Loading branch information
Showing
24 changed files
with
2,371 additions
and
261 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,21 @@ | ||
package software.amazon.event.ruler; | ||
|
||
import java.util.Set; | ||
|
||
/** | ||
* Represents a suggestion of a state/token combo from which there might be a transition, in an array-consistent fashion. | ||
*/ | ||
class ACStep { | ||
final int fieldIndex; | ||
final NameState nameState; | ||
final Set<Double> candidateSubRuleIds; | ||
final ArrayMembership membershipSoFar; | ||
|
||
ACStep(final int fieldIndex, final NameState nameState, final ArrayMembership arrayMembership) { | ||
ACStep(final int fieldIndex, final NameState nameState, final Set<Double> candidateSubRuleIds, | ||
final ArrayMembership arrayMembership) { | ||
this.fieldIndex = fieldIndex; | ||
this.nameState = nameState; | ||
this.candidateSubRuleIds = candidateSubRuleIds; | ||
this.membershipSoFar = arrayMembership; | ||
} | ||
} |
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
Oops, something went wrong.