Discussion: the possibility to provide efficient SIMD implementation of Swiss Table on the Arm platform
- Langage dominant
- C++
- Étoiles
- 18.1k
- Forks
- 3.2k
- Merge moyen
- 20 h 36 min
- PR mergées (30 j)
- 1
Description
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.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
L’issue traite de l’implémentation SIMD de la table de hachage absl. Examinez le code SSE2 existant dans la base de code, probablement dans des fichiers liés à swiss_table ou aux tables de hachage. Étudiez les intrinsèques ARM NEON et le défi spécifique consistant à émuler efficacement _mm_movemask_epi8. Un benchmarking par rapport à l’implémentation portable en C++ est nécessaire pour valider toute nouvelle approche.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- cpp
- Domaine
- performance
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 25/100