-
Notifications
You must be signed in to change notification settings - Fork 397
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
Multi-line parsing supports SIMD optimization #1872
base: main
Are you sure you want to change the base?
Conversation
zhongyuankai seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
e1fdb43
to
46e9a4c
Compare
@zhongyuankai Can you share the performance comparison before and after this PR? |
@zhongyuankai Is it convenient to communicate on WeChat or DingTalk? |
@linrunqi08 Thank you for your reply. I have updated the comment. I am happy to communicate with you. How can I contact you on WeChat? |
@zhongyuankai You can add my WeChat ID: linrunqi08 |
const int vecSize = 32; | ||
__m256i newlineVec = _mm256_set1_epi8('\n'); | ||
|
||
for (int32_t pos = end - vecSize; pos >= 0; pos -= vecSize) { |
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.
如果不是32的整数倍长度怎么办?好像剩下的没检查?
Improve the performance of parsing newlines through SIMD.
The following are the performance comparison test results under 150 tasks and 180MB/s traffic:
Before optimization:
After optimization:
After optimization, the performance is improved by about 8%. If the
GetNextLine
method is tested separately, the performance is improved by 1 times.