pingcap / pingcap/tiflash

Rewrite some batch algorithms with `AVX2`

Open
#6,839 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

good first issue help wanted type/enhancement type/performance
Dominant language
C++
Stars
1k
Forks
423
Avg merge
1d 15h
Merged PRs (30d)
24

Description

Enhancement

There are some batch algorithms that use sse2, like
https://github.com/pingcap/tiflash/blob/47d4c8fa5c0beccc009166eea00187bb2cd0904e/dbms/src/Columns/ColumnVector.cpp#L227-L260

Since we enable avx2 by default, we can rewrite them with avx2.

To deploy TiFlash under the Linux AMD64 architecture, the CPU must support AVX2 instruction sets. Use cat /proc/cpuinfo | grep avx2 to confirm that there is output. By using such CPU instruction sets, TiFlash's vectorization engine can deliver better performance.
https://docs.pingcap.com/tidb/dev/tiflash-overview#architecture

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with dbms/src/Columns/ColumnVector.cpp at the linked lines and identify the batch algorithms currently using SSE2. Review how AVX2 is enabled for TiFlash, then determine which algorithms can be rewritten while preserving their behavior. Done means the applicable SSE2 batch algorithms use AVX2 under the stated Linux AMD64 requirement.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.