Discussion: the possibility to provide efficient SIMD implementation of Swiss Table on the Arm platform
- 主要語言
- C++
- 星號
- 18.1k
- 分支
- 3.2k
- 平均合併
- 20 小時 36 分鐘
- 30 天內合併 PR
- 1
描述
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.
貢獻指南
研究方向
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.
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- cpp
- 領域
- performance
- Issue 類型
- 功能
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100