-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve boolean parsing performance #11308
Improve boolean parsing performance #11308
Conversation
Compatibility status:Checks if related components are compatible with change 4aec65c Incompatible componentsSkipped componentsCompatible componentsCompatible components: [https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/performance-analyzer.git] |
❕ Gradle check result for 569d8bb: UNSTABLE
Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #11308 +/- ##
============================================
- Coverage 71.38% 71.31% -0.08%
+ Complexity 59007 58903 -104
============================================
Files 4890 4890
Lines 277432 277408 -24
Branches 40313 40298 -15
============================================
- Hits 198056 197829 -227
- Misses 62913 63120 +207
+ Partials 16463 16459 -4 ☔ View full report in Codecov by Sentry. |
569d8bb
to
714f320
Compare
❕ Gradle check result for 714f320: UNSTABLE
Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
Signed-off-by: Ketan Verma <[email protected]>
714f320
to
4aec65c
Compare
❕ Gradle check result for 4aec65c: UNSTABLE
Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Failing checks are inspected and point to the corresponding known issue(s)
Could you please investigate the repeated build failures and come back with updates on the issues that impacted this PR?
|
Signed-off-by: Ketan Verma <[email protected]> Signed-off-by: Ketan Verma <[email protected]> (cherry picked from commit 26a1439) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: Ketan Verma <[email protected]> Signed-off-by: Ketan Verma <[email protected]> (cherry picked from commit 26a1439) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
(cherry picked from commit 26a1439) Signed-off-by: Ketan Verma <[email protected]> Signed-off-by: Ketan Verma <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: Ketan Verma <[email protected]> Signed-off-by: Ketan Verma <[email protected]>
Signed-off-by: Ketan Verma <[email protected]> Signed-off-by: Ketan Verma <[email protected]>
Signed-off-by: Ketan Verma <[email protected]> Signed-off-by: Ketan Verma <[email protected]>
Signed-off-by: Ketan Verma <[email protected]> Signed-off-by: Ketan Verma <[email protected]> Signed-off-by: Shivansh Arora <[email protected]>
Description
Bunch of modernization changes to the
Booleans
helper class.parseBoolean
andisBoolean
when operating on char arrays.String
tochar[]
conversion in theBooleanFieldMapper
.Micro-benchmarks
Booleans::isBoolean(char[], int, int)
Each operation represents parsing the following values:
["11", "00", "sdfsdfsf", "F", "T", "on", "off", "yes", "no", "0", "1", "True", "False", "true", "false", ""]
. The new method is 6.73x faster and has zero allocations.Booleans::parseBoolean(char[], int, int, bool)
Each operation represents parsing the following values:
["true", "false", ""]
. The new method is 6.93x faster and has zero allocations for valid inputs. For invalid inputs, it will perform some allocations to throw an exception (same as before).Check List
Public documentation issue/PR createdBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.