perf(scan): AVX-512 + vpclmulqdq scanner backend
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 30/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- github-actions, rust
- Lĩnh vực
- ci-cd, performance
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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-latestrunner 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 -uCollect output over several CI runs; only proceed if
vpclmulqdqis 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.rsmirroringavx2.rswith 128-byte chunks - Dispatcher (
src/scan/mod.rs): AVX-512 → AVX2 → scalar fallback chain - New
avx512feature flag (default off) so release builds stay portable - Use
_mm512_clmulepi64_epi128for 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_crosscheckproptest extended to compare AVX-512 vs scalar - CI matrix on a runner confirmed to have
vpclmulqdq -
make bench3-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.
- Ngôn ngữ chính
- Rust
- Star
- 2
- Fork
- 0
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của api7/lua-qjson
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Tất cả issue của api7/lua-qjson
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
bug core
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
-
JIT-compiled number -> Decimal conversion silently overflows instead of raising DECIMAL_OVERFLOW Đang mởfuzz
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
ClickHouse/ClickHouse#122114 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
linebender/vello_svg#90 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100