Skip to content

Commit

Permalink
feat: http parse optimizations for armv8
Browse files Browse the repository at this point in the history
feat: add unittest for http parser
  • Loading branch information
helintongh committed Sep 15, 2023
1 parent 8a653d2 commit d6f7df2
Show file tree
Hide file tree
Showing 8 changed files with 578 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ cinatra支持通过指令集优化其内部逻辑,其通过宏来控制是否
```shell
cmake -DENABLE_SIMD=SSE42 .. # 启用sse4.2指令集
cmake -DENABLE_SIMD=AVX2 .. # 启用avx2指令集
cmake -DENABLE_SIMD=AARCH64 .. # arm环境下,启用neon指令集
```

# 快速示例
Expand Down
2 changes: 1 addition & 1 deletion cmake/develop.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ endif()
if(ENABLE_SIMD STREQUAL "SSE42" OR ENABLE_SIMD STREQUAL "AVX2" OR ENABLE_SIMD STREQUAL "AARCH64")
if (CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "aarch64")
message(STATUS "Build with simd in aarch64")
add_definitions(-DCINATRA_AARCH64)
add_definitions(-DCINATRA_ARM_OPT)
elseif (CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "x86_64")
message(STATUS "Build with simd in X86_64")
if (ENABLE_SIMD STREQUAL "SSE42")
Expand Down
4 changes: 3 additions & 1 deletion example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ endif()

if (ENABLE_SIMD STREQUAL "AARCH64")
if (CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "aarch64")
#TODO
add_library(neon INTERFACE IMPORTED)
target_compile_options(neon INTERFACE -march=armv8-a+fp+simd)
target_link_libraries(${project_name} neon)
endif ()
elseif (ENABLE_SIMD STREQUAL "SSE42")
if (CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "x86_64")
Expand Down
Loading

0 comments on commit d6f7df2

Please sign in to comment.