Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

perf(scan): AVX-512 + vpclmulqdq scanner backend

オープン
#9 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
30/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
github-actions, rust
領域
ci-cd, performance

調査の方向性

Read src/scan/avx2.rs and src/scan/mod.rs, then run the proposed CPU-feature diagnostic in the CI workflow to establish whether vpclmulqdq is consistently available. If the prerequisite is met, done means adding the feature-gated AVX-512 path, dispatcher fallback, cross-check coverage, supported-runner validation, and benchmark evidence.

索引モデルが issue の本文から書いたものです。

説明

enhancement

Context

Current scanner uses AVX2 + PCLMUL (128-bit). On CPUs supporting avx512bw + vpclmulqdq (Ice Lake / Sapphire Rapids / Zen 4+), a 128-byte chunk path could halve the loop iteration count.

Prerequisite: CPU support audit

This issue is gated on confirming that the project's actual build/CI hosts support vpclmulqdq. If not, ROI is 0 and the issue should be deferred indefinitely.

  • Local dev host: confirmed missing vpclmulqdq (Skylake-X / Skylake-SP — has avx512bw but not vpclmulqdq). Cannot test locally.

  • CI runners: ubuntu-latest runner CPUs vary by allocation. Add a one-line diagnostic to the workflow:

    - name: CPU features
      run: grep -oE '\b(avx2|avx512bw|vpclmulqdq|pclmulqdq)\b' /proc/cpuinfo | sort -u
    

    Collect output over several CI runs; only proceed if vpclmulqdq is reliably present.

If CI runners do not reliably provide vpclmulqdq, the only path to validating this is paid larger-runners or self-hosted runners.

Proposal (pending CPU confirmation)

  • New src/scan/avx512.rs mirroring avx2.rs with 128-byte chunks
  • Dispatcher (src/scan/mod.rs): AVX-512 → AVX2 → scalar fallback chain
  • New avx512 feature flag (default off) so release builds stay portable
  • Use _mm512_clmulepi64_epi128 for the inside-string prefix-XOR

Estimated impact

est. speedup
CPUs with avx512bw + vpclmulqdq ~1.5–2× scan throughput
Other CPUs 0 (dispatcher falls back)

Validation plan

  • scanner_crosscheck proptest extended to compare AVX-512 vs scalar
  • CI matrix on a runner confirmed to have vpclmulqdq
  • make bench 3-run median on supported hardware

Recommendation

Last in the perf followup queue. The CPU support situation is uncertain; if it turns out CI runners don't have vpclmulqdq, this is dead code we maintain forever. Do the cheap wins (#5 memchr, #6 pooling, #7 PGO, #8 micro-opts) first.

主要言語
Rust
スター
2
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

api7/lua-qjson のほかの issue

api7/lua-qjson の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。