Discussion: the possibility to provide efficient SIMD implementation of Swiss Table on the Arm platform
- 主要言語
- C++
- スター
- 18.1k
- フォーク
- 3.2k
- 平均マージ
- 20時間 36分
- マージ済み PR(30日)
- 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.
コントリビューションガイド
調査の方向性
この issue では、absl ハッシュテーブルの SIMD 実装について扱います。コードベースにある既存の SSE2 コードを確認してください。おそらく swiss_table またはハッシュテーブルに関連するファイルにあります。ARM NEON intrinsic と、_mm_movemask_epi8 を効率的にエミュレートするという特有の課題を調査してください。新しいアプローチを検証するには、portable C++ 実装とのベンチマークが必要です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- cpp
- 領域
- performance
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 25/100