-
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 <ketan9495@gmail.com>
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 <ketan9495@gmail.com> Signed-off-by: Ketan Verma <9292653+ketanv3@users.noreply.github.com> (cherry picked from commit 26a1439) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: Ketan Verma <ketan9495@gmail.com> Signed-off-by: Ketan Verma <9292653+ketanv3@users.noreply.github.com> (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 <ketan9495@gmail.com> Signed-off-by: Ketan Verma <9292653+ketanv3@users.noreply.github.com> 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 <ketan9495@gmail.com> Signed-off-by: Ketan Verma <9292653+ketanv3@users.noreply.github.com>
Signed-off-by: Ketan Verma <ketan9495@gmail.com> Signed-off-by: Ketan Verma <9292653+ketanv3@users.noreply.github.com>
Signed-off-by: Ketan Verma <ketan9495@gmail.com> Signed-off-by: Ketan Verma <9292653+ketanv3@users.noreply.github.com>
Signed-off-by: Ketan Verma <ketan9495@gmail.com> Signed-off-by: Ketan Verma <9292653+ketanv3@users.noreply.github.com> Signed-off-by: Shivansh Arora <hishiv@amazon.com>
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.