-
Notifications
You must be signed in to change notification settings - Fork 373
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
feat: improving http parser with simd isa(now support sse4.2 and avx2) #376
Conversation
next feature I want to optimize memcpy function by modeled on dpdk. |
Code Coverage Report
|
Codecov ReportPatch coverage:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## master #376 +/- ##
==========================================
- Coverage 63.17% 63.17% -0.01%
==========================================
Files 207 207
Lines 12392 12393 +1
==========================================
Hits 7829 7829
- Misses 4563 4564 +1
☔ View full report in Codecov by Sentry. |
Nice, please also add benchmark code. |
I will test it later. |
test code and details in there on github. I found a weird condition.when header's suffix is hpp benchmark performance will be better.Maybe we should change picohttpparser.h to picohttpparser.hpp. |
Please add note: how to use these macros. |
add notes. |
Code Coverage Report
|
使用如下命令即可编译带simd优化的cinatra。 | ||
|
||
```shell | ||
cmake -DENABLE_SIMD=SSE42 .. # 启用sse4.2指令集 |
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.
这两个能同时启用吗?
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.
不能,文档里再说明一下?
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.
说明一下
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.
添加了说明
feat: add notes for isa
8e3640e
to
dd2399e
Compare
Code Coverage Report
|
Code Coverage Report
|
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.
LGTM
benchmark in 11th Gen Intel(R) Core(TM) i7-11700 @ 2.50GHz:
all use o3 flag.and parse http string 5000000 times.
without simd parser http : Elapsed 4.782222 seconds.
with sse4.2: Elapsed 1.650459 seconds.
with avx2: Elapsed 3.895595 seconds.
In fact, High-end devices avx2 instruction set will perform better.