)]}'
{
  "commit": "4dbfe28864d73a20c331ec59cc93249aed37dfef",
  "tree": "baae7c58a4d610e161feb3c1bf5ae33f45edd22a",
  "parents": [
    "2bf1b65ffbc5353c88b73489c8a046eba0172869"
  ],
  "author": {
    "name": "changbao zhan",
    "email": "zhan.changbao@sanechips.com.cn",
    "time": "Mon Sep 21 16:54:29 2026 +0800"
  },
  "committer": {
    "name": "Gang Wu",
    "email": "ustcwg@gmail.com",
    "time": "Mon Sep 21 16:54:29 2026 +0800"
  },
  "message": "ORC-2216: [C++] Add RVV bit-unpacking for RLEv2\n\n# Add  RVV acceleration for RLEv2 bit unpacking\n\nThe scalar RLEv2 decoder is a  bottleneck when we\u0027re reading wide integer columns. Since RVV hardware is becoming much more common, this patch adds a vectorized path to unpack bits in parallel.\n\n## Changes\n- Add `c++/src/BpackingRvv.{hh,cc}`: Covers bit widths 3..32, 40, 48 and 56 using gather-based and strided-load vector paths; falls back to the scalar implementation for widths 1, 2, 64 and for bit-level misalignment / buffer boundaries.\n- `c++/src/Dispatch.hh`: add `DispatchLevel::RVV` and the corresponding `isSupported` check.\n- `c++/src/RleDecoderV2.cc`: register the RVV implementation in the dispatch table when `ORC_HAVE_RUNTIME_RVV` is defined.\n- `c++/src/CMakeLists.txt` and `c++/test/CMakeLists.txt`: compile the new source under RVV builds and reuse `TestRleVectorDecoder.cc` for vector decoder test coverage.\n\n## Test\n\n1. Build with `-DBUILD_ENABLE_RVV\u003dON` on a RISC-V machine(SG2044) with Gcc support RVV(I used gcc 14.2.1).\n2. use ORC_USER_SIMD_LEVEL\u003dRVV ./orc-test and ORC_USER_SIMD_LEVEL\u003dNONE ./orc-test，all unittest pass.\n3. I write a small standalone benchmark(bench_rvv.cc) to compare scalar and RVV decoding speeds. Switch paths via `ORC_USER_SIMD_LEVEL\u003dNONE|RVV`. but i dont left `bench_rvv.cc` at the repo.\n\n ## performance\n| bits | NONE_Mvals/s | RVV_Mvals/s | speedup |\n|------|-------------|-------------|---------|\n| 1    | 80.8        | 78.5        | 0.97    |\n| 2    | 106.2       | 102.4       | 0.96    |\n| 3    | 114.1       | 160.8       | 1.41    |\n| 4    | 217.9       | 235.4       | 1.08    |\n| 5    | 96.2        | 240.1       | 2.50    |\n| 6    | 79.9        | 245.3       | 3.07    |\n| 7    | 75.4        | 246.7       | 3.27    |\n| 8    | 237.3       | 276.0       | 1.16    |\n| 9    | 70.8        | 175.0       | 2.47    |\n| 10   | 69.5        | 124.3       | 1.79    |\n| 12   | 60.7        | 110.7       | 1.82    |\n| 14   | 52.8        | 102.1       | 1.93    |\n| 16   | 184.6       | 238.1       | 1.29    |\n| 17   | 55.4        | 173.9       | 3.14    |\n| 20   | 48.2        | 173.9       | 3.61    |\n| 24   | 156.3       | 176.9       | 1.13    |\n| 26   | 41.3        | 135.0       | 3.27    |\n| 28   | 35.2        | 135.6       | 3.85    |\n| 30   | 32.3        | 135.9       | 4.21    |\n| 32   | 155.2       | 162.0       | 1.04    |\n| 40   | 139.7       | 146.6       | 1.05    |\n| 48   | 126.8       | 134.7       | 1.06    |\n| 56   | 108.3       | 100.1       | 0.92    |\n| 64   | 111.0       | 111.3       | 1.00    |\n## Screenshot\n## unittest\n\u003cimg width\u003d\"1340\" height\u003d\"495\" alt\u003d\"功能测试\" src\u003d\"https://github.com/user-attachments/assets/384ec71d-9150-4885-9657-7a5402c03096\" /\u003e\n\n## performance\n\u003cimg width\u003d\"708\" height\u003d\"1260\" alt\u003d\"性能测试\" src\u003d\"https://github.com/user-attachments/assets/d4c9956d-357d-4d14-82ac-3313120568fe\" /\u003e\n\n## bench_rvv.cc\n\u003cimg width\u003d\"1136\" height\u003d\"1861\" alt\u003d\"bench_rvv cc\" src\u003d\"https://github.com/user-attachments/assets/0affb9c6-6762-474b-9222-5a31b5b30ef6\" /\u003e\n\nCloses #2706 from zhanchangbao-sanechips/rvvopt.\n\nAuthored-by: changbao zhan \u003czhan.changbao@sanechips.com.cn\u003e\nSigned-off-by: Gang Wu \u003custcwg@gmail.com\u003e\n",
  "tree_diff": [
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "90695e2a22aa0eb7dc67000c4e7aa87f87788f6f",
      "new_mode": 33188,
      "new_path": "c++/src/BpackingRvv.cc"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "1273c1ff9d3c17da65ff39f67c6921f0e7272e98",
      "new_mode": 33188,
      "new_path": "c++/src/BpackingRvv.hh"
    },
    {
      "type": "modify",
      "old_id": "efddae23eac7d8559ab0bbeb40a3ed0e60de3a6b",
      "old_mode": 33188,
      "old_path": "c++/src/CMakeLists.txt",
      "new_id": "5ba2ea547a44f5e9fda2d66fcabab414685437f9",
      "new_mode": 33188,
      "new_path": "c++/src/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "489317b28a83d2a2b393ce8c18fe32b582317c18",
      "old_mode": 33188,
      "old_path": "c++/src/Dispatch.hh",
      "new_id": "1b374b5cd18d2cb856269b438adb055df8e621f9",
      "new_mode": 33188,
      "new_path": "c++/src/Dispatch.hh"
    },
    {
      "type": "modify",
      "old_id": "d3192869a0f81717ed99c45a4858bb25d60be151",
      "old_mode": 33188,
      "old_path": "c++/src/RleDecoderV2.cc",
      "new_id": "94b2bf326c71a2e7dd348a799a554129e236b610",
      "new_mode": 33188,
      "new_path": "c++/src/RleDecoderV2.cc"
    },
    {
      "type": "modify",
      "old_id": "93b066db64e8e3d5675eb0067ef126bb0a99f713",
      "old_mode": 33188,
      "old_path": "c++/test/CMakeLists.txt",
      "new_id": "6d23e70839e445cb6e5c2c0d3f912b0860134cb9",
      "new_mode": 33188,
      "new_path": "c++/test/CMakeLists.txt"
    }
  ]
}
