tidb icon indicating copy to clipboard operation
tidb copied to clipboard

fix: faster two vector function save two loop

Open yihong0618 opened this issue 5 months ago • 4 comments
trafficstars

What problem does this PR solve?

This patch aim to faster two vector function save the one loop for each

and fix one TODO.

Reason: just saw some of the code idea is from pgvector, but in Pgvector side the reason why use two loops for vector function is for -ftree-vectorize for pg, it seems no benefits for TiDB correct me if it is wrong~

more can check this close patch for pgvector: https://github.com/pgvector/pgvector/pull/639

also fix a TODO in it.

cc @zimulala

Problem Summary:

What changed and how does it work?

Check List

Tests

  • [ ] Unit test
  • [ ] Integration test
  • [ ] Manual test (add detailed scripts or steps below)
  • [ ] No need to test
    • [ ] I checked and no code files have been changed.

Side effects

  • [ ] Performance regression: Consumes more CPU
  • [ ] Performance regression: Consumes more Memory
  • [ ] Breaking backward compatibility

Documentation

  • [ ] Affects user behaviors
  • [ ] Contains syntax changes
  • [ ] Contains variable changes
  • [ ] Contains experimental features
  • [ ] Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

yihong0618 avatar Jun 17 '25 07:06 yihong0618

[FORMAT CHECKER NOTIFICATION]

Notice: To remove the do-not-merge/needs-linked-issue label, please provide the linked issue number on one line in the PR body, for example: Issue Number: close #123 or Issue Number: ref #456.

:open_book: For more info, you can check the "Contribute Code" section in the development guide.


Notice: To remove the do-not-merge/needs-tests-checked label, please finished the tests then check the finished items in description.

For example:

Tests

  • [x] Unit test
  • [ ] Integration test
  • [ ] Manual test (add detailed scripts or steps below)
  • [ ] No code

:open_book: For more info, you can check the "Contribute Code" section in the development guide.

ti-chi-bot[bot] avatar Jun 17 '25 07:06 ti-chi-bot[bot]

Hi @yihong0618. Thanks for your PR.

I'm waiting for a pingcap member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

ti-chi-bot[bot] avatar Jun 17 '25 07:06 ti-chi-bot[bot]

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please assign cfzjywxk for approval. For more information see the Code Review Process. Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

ti-chi-bot[bot] avatar Jun 17 '25 07:06 ti-chi-bot[bot]

Hi @yihong0618. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

tiprow[bot] avatar Jun 17 '25 07:06 tiprow[bot]

/ok-to-test

lance6716 avatar Jun 20 '25 01:06 lance6716

Codecov Report

:x: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 76.7197%. Comparing base (e8aa60d) to head (e0ed299). :warning: Report is 633 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #61774        +/-   ##
================================================
+ Coverage   73.0655%   76.7197%   +3.6542%     
================================================
  Files          1730       1835       +105     
  Lines        481483     548933     +67450     
================================================
+ Hits         351798     421140     +69342     
+ Misses       108134     106276      -1858     
+ Partials      21551      21517        -34     
Flag Coverage Δ
integration 45.6832% <0.0000%> (?)
unit 76.0467% <0.0000%> (+3.7404%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.9532% <ø> (+0.1728%) :arrow_up:
parser ∅ <ø> (∅)
br 48.1917% <ø> (+1.5046%) :arrow_up:
:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Jun 20 '25 01:06 codecov[bot]

/ok-to-test

hawkingrei avatar Aug 26 '25 00:08 hawkingrei