doris icon indicating copy to clipboard operation
doris copied to clipboard

[Improvement](predicate) Replace for-loop by memcpy

Open Gabriel39 opened this issue 3 years ago • 2 comments

Proposed changes

This PR replace for-loop by memcpy. I did two experiments.

Experiment 1

Run ckbench q20 and print a flame graph. Compare proportion of this function time to the total time.

I got: for-loop:1.74% memcpy:0.013%

Experiment 2

Run SELECT JavaEnable FROM hits. 9900w+ rows returned and JavaEnable is SMALL INT. Compare the BlockLoadTime. I got: for-loop:1s225ms memcpy:805.603ms

Problem summary

Describe your changes.

Checklist(Required)

  1. Does it affect the original behavior:
    • [ ] Yes
    • [ ] No
    • [ ] I don't know
  2. Has unit tests been added:
    • [ ] Yes
    • [ ] No
    • [ ] No Need
  3. Has document been added or modified:
    • [ ] Yes
    • [ ] No
    • [ ] No Need
  4. Does it need to update dependencies:
    • [ ] Yes
    • [ ] No
  5. Are there any changes that cannot be rolled back:
    • [ ] Yes (If Yes, please explain WHY)
    • [ ] No

Further comments

If this is a relatively large or complex change, kick off the discussion at [email protected] by explaining why you chose the solution you did and what alternatives you considered, etc...

Gabriel39 avatar Sep 22 '22 09:09 Gabriel39

PR approved by at least one committer and no changes requested.

github-actions[bot] avatar Sep 22 '22 14:09 github-actions[bot]

PR approved by anyone and no changes requested.

github-actions[bot] avatar Sep 22 '22 14:09 github-actions[bot]