Reduce Feature Flags rule evaluation allocations - #12217
Draft
leoromanovsky wants to merge 1 commit into
Draft
Conversation
Contributor
|
🎯 Code Coverage (details) 🔗 Commit SHA: 43ba527 | Docs | Datadog PR Page | Give us feedback! |
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.
Motivation
Regex rules compiled and normalized the expression during every evaluation. JDK 11 JMH measured 341 ns and 2,256 bytes per operation.
Shard rules created an MD5 helper, a combined input string, and a hexadecimal string. JDK 11 JMH measured 345 ns and 1,456 bytes per operation.
The static control measured 80 ns and 368 bytes per operation.
Changes and Decisions
PARSE_ERRORbehavior.Validation
JDK 11 single-thread JMH results:
Four-thread JDK 26 JMH results:
The shard parity test preserves the Go and Eppo vectors for
eve,user-1,alice, andbob.