-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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.