)]}'
{
  "commit": "a6e8a31b8634ae87fe0c428aefe0eae6eed004ab",
  "tree": "791f072ced02eeab38d91f82484699a33bcde764",
  "parents": [
    "873d4682c7d285540b8f28bfe637006cef8918a6",
    "dbc870afec91308b2e6a6c6ba16e8f3bb085e338"
  ],
  "author": {
    "name": "Stuart Cook",
    "email": "Zalathar@users.noreply.github.com",
    "time": "Mon Jan 26 14:36:21 2026 +1100"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Mon Jan 26 14:36:21 2026 +1100"
  },
  "message": "Rollup merge of #151611 - bonega:improve-is-slice-is-ascii-performance, r\u003dfolkertdev\n\nImprove is_ascii performance on x86_64 with explicit SSE2 intrinsics\n\n# Summary\n\nImproves `slice::is_ascii` performance for SSE2 target roughly 1.5-2x on larger inputs.\nAVX-512 keeps similiar performance characteristics.\n\nThis is building on the work already merged in rust-lang/rust#151259.\nIn particular this PR improves the default SSE2 performance, I don\u0027t consider this a temporary fix anymore.\nThanks to @folkertdev for pointing me to consider `as_chunk` again.\n\n# The implementation:\n- Uses 64-byte chunks with 4x 16-byte SSE2 loads OR\u0027d together\n- Extracts the MSB mask with a single `pmovmskb` instruction\n- Falls back to usize-at-a-time SWAR for inputs \u003c 64 bytes\n\n# Performance impact (vs before rust-lang/rust#151259):\n- AVX-512: 34-48x faster\n- SSE2: 1.5-2x faster\n\n  \u003cdetails\u003e\n  \u003csummary\u003eBenchmark Results (click to expand)\u003c/summary\u003e\n\n  Benchmarked on AMD Ryzen 9 9950X (AVX-512 capable). Values show relative performance (1.00 \u003d fastest).\n  Tops out at 139GB/s for large inputs.\n\n  ### early_non_ascii\n\n  | Input Size | new_avx512 | new_sse2 | old_avx512 | old_sse2 |\n  |------------|------------|----------|------------|----------|\n  | 64 | 1.01 | **1.00** | 13.45 | 1.13 |\n  | 1024 | 1.01 | **1.00** | 13.53 | 1.14 |\n  | 65536 | 1.01 | **1.00** | 13.99 | 1.12 |\n  | 1048576 | 1.02 | **1.00** | 13.29 | 1.12 |\n\n  ### late_non_ascii\n\n  | Input Size | new_avx512 | new_sse2 | old_avx512 | old_sse2 |\n  |------------|------------|----------|------------|----------|\n  | 64 | **1.00** | 1.01 | 13.37 | 1.13 |\n  | 1024 | 1.10 | **1.00** | 42.42 | 1.95 |\n  | 65536 | **1.00** | 1.06 | 42.22 | 1.73 |\n  | 1048576 | **1.00** | 1.03 | 34.73 | 1.46 |\n\n  ### pure_ascii\n\n  | Input Size | new_avx512 | new_sse2 | old_avx512 | old_sse2 |\n  |------------|------------|----------|------------|----------|\n  | 4 | 1.03 | **1.00** | 1.75 | 1.32 |\n  | 8 | **1.00** | 1.14 | 3.89 | 2.06 |\n  | 16 | **1.00** | 1.04 | 1.13 | 1.62 |\n  | 32 | 1.07 | 1.19 | 5.11 | **1.00** |\n  | 64 | **1.00** | 1.13 | 13.32 | 1.57 |\n  | 128 | **1.00** | 1.01 | 19.97 | 1.55 |\n  | 256 | **1.00** | 1.02 | 27.77 | 1.61 |\n  | 1024 | **1.00** | 1.02 | 41.34 | 1.84 |\n  | 4096 | 1.02 | **1.00** | 45.61 | 1.98 |\n  | 16384 | 1.01 | **1.00** | 48.67 | 2.04 |\n  | 65536 | **1.00** | 1.03 | 43.86 | 1.77 |\n  | 262144 | **1.00** | 1.06 | 41.44 | 1.79 |\n  | 1048576 | 1.02 | **1.00** | 35.36 | 1.44 |\n\n  \u003c/details\u003e\n\n## Reproduction / Test Projects\n\nStandalone validation tools: https://github.com/bonega/is-ascii-fix-validation\n\n- `bench/` - Criterion benchmarks for SSE2 vs AVX-512 comparison\n- `fuzz/` - Compares old/new implementations with libfuzzer\n\nRelates to: https://github.com/llvm/llvm-project/issues/176906\n",
  "tree_diff": []
}
