abseil / abseil/abseil-cpp

Discussion: the possibility to provide efficient SIMD implementation of Swiss Table on the Arm platform

Đang mở
#1,096 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
question
Ngôn ngữ chính
C++
Star
18.1k
Fork
3.2k
Merge trung bình
20 giờ 36 phút
Pull request đã merge (30 ngày)
1

Mô tả

The absl hash table on the x86 architecture uses SIMD (SSE2) instructions to help filter possible matching keys faster. However, I found that there is no corresponding SIMD implementation on the arm platform.

At first, I thought the absl community was not motivated to optimize it for the less-used arm platform. So, I tried to implement it myself using neon SIMD instructions on the arm architecture, but I quickly found a problem. When using the SSE instruction set, `_mm_movemask_epi8` can be implemented with only one instruction. Yet there is no direct counterpart in the neon instruction set, and every alternative I can find requires several more instructions, which introduces a much larger latency.

Anyway, I tried to achieve the same method using SIMD instructions on the arm platform. But as expected, the speed is slightly slower than the portable C++ code.

So I would like to ask Googlers if anyone has ever tried to implement a SIMD adaptation of the Swiss Table for the Arm architecture, and if they encountered similar problems. And is the reason why there is still no SIMD-optimized version for Arm, as I thought because the arm platform lacks instructions that can efficiently implement the Swiss Table.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

The issue discusses the absl hash table's SIMD implementation. Look at the existing SSE2 code in the codebase, likely in files related to swiss_table or hash tables. Research ARM NEON intrinsics and the specific challenge of emulating _mm_movemask_epi8 efficiently. Benchmarking against the portable C++ implementation is needed to validate any new approach.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
cpp
Lĩnh vực
performance
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.