This is an automated email from the ASF dual-hosted git repository.
viirya pushed a commit to branch branch-4.x
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-4.x by this push:
new efe1e560cdfb [SPARK-57042][SQL][TESTS] Add
WritableColumnVectorBulkFillBenchmark
efe1e560cdfb is described below
commit efe1e560cdfb0b3063f500e2af2b81aecf7b99b0
Author: Liang-Chi Hsieh <[email protected]>
AuthorDate: Sun May 24 17:51:23 2026 -0700
[SPARK-57042][SQL][TESTS] Add WritableColumnVectorBulkFillBenchmark
### What changes were proposed in this pull request?
Adds a low-level benchmark, `WritableColumnVectorBulkFillBenchmark`,
for the constant-value bulk-fill APIs on `WritableColumnVector`:
- `putBooleans(rowId, count, value)`
- `putBytes(rowId, count, value)`
- `putShorts(rowId, count, value)`
- `putInts(rowId, count, value)`
- `putLongs(rowId, count, value)`
- `putNulls(rowId, count)`
The benchmark sweeps `count = 1, 8, 64, 512, 4096, 65536`, covering both
the call-overhead dominated regime (small count) and the memory
bandwidth dominated regime (large count). Each case runs on both
`OnHeapColumnVector` and `OffHeapColumnVector`.
### Why are the changes needed?
There is currently no benchmark covering these constant-value bulk-fill
APIs in isolation. SPARK-57024 and SPARK-57036 are optimizing several
of them; this benchmark establishes a stable baseline so future
optimizations to these methods can be tracked.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
The benchmark itself compiles and runs. No production code change.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 4.7)
Closes #56084 from viirya/add-bulk-fill-benchmark.
Authored-by: Liang-Chi Hsieh <[email protected]>
Signed-off-by: Liang-Chi Hsieh <[email protected]>
(cherry picked from commit 0d57b02b01558d674fa8a3e9fc0021c6b728f8b1)
Signed-off-by: Liang-Chi Hsieh <[email protected]>
---
...ColumnVectorBulkFillBenchmark-jdk21-results.txt | 257 +++++++++++++++++++++
...ColumnVectorBulkFillBenchmark-jdk25-results.txt | 257 +++++++++++++++++++++
...itableColumnVectorBulkFillBenchmark-results.txt | 257 +++++++++++++++++++++
.../WritableColumnVectorBulkFillBenchmark.scala | 155 +++++++++++++
4 files changed, 926 insertions(+)
diff --git
a/sql/core/benchmarks/WritableColumnVectorBulkFillBenchmark-jdk21-results.txt
b/sql/core/benchmarks/WritableColumnVectorBulkFillBenchmark-jdk21-results.txt
new file mode 100644
index 000000000000..83539c0e629e
--- /dev/null
+++
b/sql/core/benchmarks/WritableColumnVectorBulkFillBenchmark-jdk21-results.txt
@@ -0,0 +1,257 @@
+================================================================================================
+WritableColumnVector bulk fill
+================================================================================================
+
+OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1013-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+putBooleans (boolean) count=1: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 79.2 12.6 1.0X
+OffHeap 0 0
0 124.4 8.0 1.6X
+
+OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1013-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+putBooleans (boolean) count=8: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 634.0 1.6 1.0X
+OffHeap 0 0
0 897.3 1.1 1.4X
+
+OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1013-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+putBooleans (boolean) count=64: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 7687.5 0.1 1.0X
+OffHeap 0 0
0 1642.6 0.6 0.2X
+
+OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1013-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+putBooleans (boolean) count=512: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 48232.6 0.0 1.0X
+OffHeap 0 0
0 1701.0 0.6 0.0X
+
+OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1013-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+putBooleans (boolean) count=4096: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 128770.2 0.0 1.0X
+OffHeap 2 2
0 1715.8 0.6 0.0X
+
+OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1013-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+putBooleans (boolean) count=65536: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 1 1
0 62765.7 0.0 1.0X
+OffHeap 39 39
0 1718.0 0.6 0.0X
+
+OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1013-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+putBytes (byte) count=1: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 72.6 13.8 1.0X
+OffHeap 0 0
0 108.9 9.2 1.5X
+
+OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1013-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+putBytes (byte) count=8: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 581.1 1.7 1.0X
+OffHeap 0 0
0 774.5 1.3 1.3X
+
+OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1013-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+putBytes (byte) count=64: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 6559.5 0.2 1.0X
+OffHeap 0 0
0 2591.9 0.4 0.4X
+
+OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1013-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+putBytes (byte) count=512: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 30826.0 0.0 1.0X
+OffHeap 0 0
0 2978.3 0.3 0.1X
+
+OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1013-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+putBytes (byte) count=4096: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 125147.1 0.0 1.0X
+OffHeap 2 2
0 2668.8 0.4 0.0X
+
+OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1013-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+putBytes (byte) count=65536: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 1 1
0 62489.2 0.0 1.0X
+OffHeap 26 26
0 2585.6 0.4 0.0X
+
+OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1013-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+putShorts (short) count=1: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 69.7 14.3 1.0X
+OffHeap 0 0
0 85.0 11.8 1.2X
+
+OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1013-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+putShorts (short) count=8: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 547.0 1.8 1.0X
+OffHeap 0 0
0 606.2 1.6 1.1X
+
+OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1013-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+putShorts (short) count=64: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 5312.2 0.2 1.0X
+OffHeap 0 0
0 2135.1 0.5 0.4X
+
+OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1013-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+putShorts (short) count=512: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 25588.8 0.0 1.0X
+OffHeap 0 0
0 2371.7 0.4 0.1X
+
+OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1013-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+putShorts (short) count=4096: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 73393.7 0.0 1.0X
+OffHeap 2 2
0 2481.8 0.4 0.0X
+
+OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1013-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+putShorts (short) count=65536: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 2 2
0 32274.4 0.0 1.0X
+OffHeap 27 27
0 2486.3 0.4 0.1X
+
+OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1013-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+putInts (int) count=1: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 68.4 14.6 1.0X
+OffHeap 0 0
0 81.1 12.3 1.2X
+
+OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1013-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+putInts (int) count=8: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 680.3 1.5 1.0X
+OffHeap 0 0
0 581.0 1.7 0.9X
+
+OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1013-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+putInts (int) count=64: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 3917.3 0.3 1.0X
+OffHeap 0 0
0 2126.1 0.5 0.5X
+
+OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1013-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+putInts (int) count=512: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 19192.0 0.1 1.0X
+OffHeap 0 0
0 2567.1 0.4 0.1X
+
+OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1013-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+putInts (int) count=4096: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 43419.7 0.0 1.0X
+OffHeap 2 2
0 2507.4 0.4 0.1X
+
+OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1013-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+putInts (int) count=65536: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 4 4
0 16570.7 0.1 1.0X
+OffHeap 27 27
1 2516.9 0.4 0.2X
+
+OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1013-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+putLongs (long) count=1: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 94.2 10.6 1.0X
+OffHeap 0 0
0 81.0 12.3 0.9X
+
+OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1013-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+putLongs (long) count=8: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 680.2 1.5 1.0X
+OffHeap 0 0
0 347.1 2.9 0.5X
+
+OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1013-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+putLongs (long) count=64: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 2302.3 0.4 1.0X
+OffHeap 0 0
0 451.2 2.2 0.2X
+
+OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1013-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+putLongs (long) count=512: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 2974.8 0.3 1.0X
+OffHeap 1 1
0 536.8 1.9 0.2X
+
+OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1013-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+putLongs (long) count=4096: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 1 1
0 3128.9 0.3 1.0X
+OffHeap 8 8
0 539.5 1.9 0.2X
+
+OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1013-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+putLongs (long) count=65536: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 21 21
0 3143.8 0.3 1.0X
+OffHeap 124 124
0 541.2 1.8 0.2X
+
+OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1013-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+putNulls ((no value)) count=1: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 69.8 14.3 1.0X
+OffHeap 0 0
0 64.5 15.5 0.9X
+
+OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1013-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+putNulls ((no value)) count=8: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 547.0 1.8 1.0X
+OffHeap 0 0
0 296.9 3.4 0.5X
+
+OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1013-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+putNulls ((no value)) count=64: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 5188.5 0.2 1.0X
+OffHeap 0 0
0 481.8 2.1 0.1X
+
+OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1013-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+putNulls ((no value)) count=512: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 34184.5 0.0 1.0X
+OffHeap 1 1
0 527.6 1.9 0.0X
+
+OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1013-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+putNulls ((no value)) count=4096: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 104460.6 0.0 1.0X
+OffHeap 8 8
0 519.2 1.9 0.0X
+
+OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1013-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+putNulls ((no value)) count=65536: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 1 1
0 61798.5 0.0 1.0X
+OffHeap 135 135
0 497.2 2.0 0.0X
+
+
diff --git
a/sql/core/benchmarks/WritableColumnVectorBulkFillBenchmark-jdk25-results.txt
b/sql/core/benchmarks/WritableColumnVectorBulkFillBenchmark-jdk25-results.txt
new file mode 100644
index 000000000000..71e1c7251ffe
--- /dev/null
+++
b/sql/core/benchmarks/WritableColumnVectorBulkFillBenchmark-jdk25-results.txt
@@ -0,0 +1,257 @@
+================================================================================================
+WritableColumnVector bulk fill
+================================================================================================
+
+OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putBooleans (boolean) count=1: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 414.1 2.4 1.0X
+OffHeap 0 0
0 448.5 2.2 1.1X
+
+OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putBooleans (boolean) count=8: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 1147.3 0.9 1.0X
+OffHeap 0 0
0 1902.5 0.5 1.7X
+
+OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putBooleans (boolean) count=64: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 1391.7 0.7 1.0X
+OffHeap 0 0
0 2661.1 0.4 1.9X
+
+OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putBooleans (boolean) count=512: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 2731.7 0.4 1.0X
+OffHeap 0 0
0 2731.7 0.4 1.0X
+
+OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putBooleans (boolean) count=4096: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 2 2
0 2783.1 0.4 1.0X
+OffHeap 2 2
0 2780.2 0.4 1.0X
+
+OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putBooleans (boolean) count=65536: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 24 24
0 2790.6 0.4 1.0X
+OffHeap 24 24
0 2789.0 0.4 1.0X
+
+OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putBytes (byte) count=1: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 143.0 7.0 1.0X
+OffHeap 0 0
0 285.6 3.5 2.0X
+
+OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putBytes (byte) count=8: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 954.6 1.0 1.0X
+OffHeap 0 0
0 1274.2 0.8 1.3X
+
+OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putBytes (byte) count=64: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 2415.6 0.4 1.0X
+OffHeap 0 0
0 2515.9 0.4 1.0X
+
+OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putBytes (byte) count=512: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 2667.3 0.4 1.0X
+OffHeap 0 0
0 2716.5 0.4 1.0X
+
+OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putBytes (byte) count=4096: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 2 2
0 2771.6 0.4 1.0X
+OffHeap 2 2
0 2777.6 0.4 1.0X
+
+OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putBytes (byte) count=65536: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 24 24
0 2788.5 0.4 1.0X
+OffHeap 24 24
0 2788.4 0.4 1.0X
+
+OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putShorts (short) count=1: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 119.3 8.4 1.0X
+OffHeap 0 0
0 106.2 9.4 0.9X
+
+OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putShorts (short) count=8: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 764.5 1.3 1.0X
+OffHeap 0 0
0 332.6 3.0 0.4X
+
+OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putShorts (short) count=64: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 2167.5 0.5 1.0X
+OffHeap 0 0
0 453.6 2.2 0.2X
+
+OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putShorts (short) count=512: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 2652.6 0.4 1.0X
+OffHeap 1 1
0 468.6 2.1 0.2X
+
+OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putShorts (short) count=4096: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 2 2
0 2772.0 0.4 1.0X
+OffHeap 9 9
0 474.1 2.1 0.2X
+
+OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putShorts (short) count=65536: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 24 24
0 2790.0 0.4 1.0X
+OffHeap 142 143
4 473.6 2.1 0.2X
+
+OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putInts (int) count=1: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 95.6 10.5 1.0X
+OffHeap 0 0
0 84.4 11.8 0.9X
+
+OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putInts (int) count=8: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 764.5 1.3 1.0X
+OffHeap 0 0
0 587.2 1.7 0.8X
+
+OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putInts (int) count=64: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 2198.1 0.5 1.0X
+OffHeap 0 0
0 1624.6 0.6 0.7X
+
+OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putInts (int) count=512: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 2638.2 0.4 1.0X
+OffHeap 0 0
0 1927.9 0.5 0.7X
+
+OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putInts (int) count=4096: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 2 2
0 2767.5 0.4 1.0X
+OffHeap 2 2
0 1974.3 0.5 0.7X
+
+OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putInts (int) count=65536: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 24 24
0 2787.1 0.4 1.0X
+OffHeap 33 34
1 2006.8 0.5 0.7X
+
+OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putLongs (long) count=1: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 95.7 10.4 1.0X
+OffHeap 0 0
0 84.4 11.8 0.9X
+
+OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putLongs (long) count=8: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 638.0 1.6 1.0X
+OffHeap 0 0
0 314.4 3.2 0.5X
+
+OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putLongs (long) count=64: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 1874.5 0.5 1.0X
+OffHeap 0 0
0 449.2 2.2 0.2X
+
+OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putLongs (long) count=512: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 2605.6 0.4 1.0X
+OffHeap 1 1
0 467.0 2.1 0.2X
+
+OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putLongs (long) count=4096: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 2 2
0 2727.4 0.4 1.0X
+OffHeap 9 9
1 473.4 2.1 0.2X
+
+OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putLongs (long) count=65536: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 24 24
1 2784.2 0.4 1.0X
+OffHeap 142 142
1 472.6 2.1 0.2X
+
+OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putNulls ((no value)) count=1: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 95.6 10.5 1.0X
+OffHeap 0 0
0 57.4 17.4 0.6X
+
+OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putNulls ((no value)) count=8: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 609.5 1.6 1.0X
+OffHeap 0 0
0 255.1 3.9 0.4X
+
+OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putNulls ((no value)) count=64: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 1933.2 0.5 1.0X
+OffHeap 0 0
0 429.3 2.3 0.2X
+
+OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putNulls ((no value)) count=512: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 2595.6 0.4 1.0X
+OffHeap 1 1
0 465.4 2.1 0.2X
+
+OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putNulls ((no value)) count=4096: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 2 2
0 2763.6 0.4 1.0X
+OffHeap 9 9
0 473.9 2.1 0.2X
+
+OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putNulls ((no value)) count=65536: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 24 24
1 2791.0 0.4 1.0X
+OffHeap 142 143
1 472.8 2.1 0.2X
+
+
diff --git
a/sql/core/benchmarks/WritableColumnVectorBulkFillBenchmark-results.txt
b/sql/core/benchmarks/WritableColumnVectorBulkFillBenchmark-results.txt
new file mode 100644
index 000000000000..39fcdba9d097
--- /dev/null
+++ b/sql/core/benchmarks/WritableColumnVectorBulkFillBenchmark-results.txt
@@ -0,0 +1,257 @@
+================================================================================================
+WritableColumnVector bulk fill
+================================================================================================
+
+OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putBooleans (boolean) count=1: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 420.7 2.4 1.0X
+OffHeap 0 0
0 291.2 3.4 0.7X
+
+OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putBooleans (boolean) count=8: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 1526.1 0.7 1.0X
+OffHeap 0 0
0 1430.2 0.7 0.9X
+
+OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putBooleans (boolean) count=64: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 2569.1 0.4 1.0X
+OffHeap 0 0
0 2585.5 0.4 1.0X
+
+OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putBooleans (boolean) count=512: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 2706.4 0.4 1.0X
+OffHeap 0 0
0 2681.7 0.4 1.0X
+
+OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putBooleans (boolean) count=4096: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 2 2
0 2777.3 0.4 1.0X
+OffHeap 2 2
0 2763.5 0.4 1.0X
+
+OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putBooleans (boolean) count=65536: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 24 24
0 2789.6 0.4 1.0X
+OffHeap 24 24
0 2777.8 0.4 1.0X
+
+OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putBytes (byte) count=1: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 177.5 5.6 1.0X
+OffHeap 0 0
0 285.6 3.5 1.6X
+
+OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putBytes (byte) count=8: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 1144.1 0.9 1.0X
+OffHeap 0 0
0 1347.6 0.7 1.2X
+
+OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putBytes (byte) count=64: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 2448.1 0.4 1.0X
+OffHeap 0 0
0 2515.9 0.4 1.0X
+
+OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putBytes (byte) count=512: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 2686.4 0.4 1.0X
+OffHeap 0 0
0 2711.6 0.4 1.0X
+
+OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putBytes (byte) count=4096: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 2 2
0 2774.5 0.4 1.0X
+OffHeap 2 2
0 2774.8 0.4 1.0X
+
+OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putBytes (byte) count=65536: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 24 24
0 2791.3 0.4 1.0X
+OffHeap 24 24
0 2786.4 0.4 1.0X
+
+OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putShorts (short) count=1: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 110.9 9.0 1.0X
+OffHeap 0 0
0 116.1 8.6 1.0X
+
+OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putShorts (short) count=8: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 818.8 1.2 1.0X
+OffHeap 0 0
0 818.0 1.2 1.0X
+
+OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putShorts (short) count=64: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 2212.3 0.5 1.0X
+OffHeap 0 0
0 2135.7 0.5 1.0X
+
+OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putShorts (short) count=512: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 2657.5 0.4 1.0X
+OffHeap 0 0
0 2623.8 0.4 1.0X
+
+OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putShorts (short) count=4096: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 2 2
0 2773.7 0.4 1.0X
+OffHeap 2 2
0 2770.3 0.4 1.0X
+
+OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putShorts (short) count=65536: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 24 24
1 2792.9 0.4 1.0X
+OffHeap 24 24
0 2792.1 0.4 1.0X
+
+OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putInts (int) count=1: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 111.3 9.0 1.0X
+OffHeap 0 0
0 87.0 11.5 0.8X
+
+OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putInts (int) count=8: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 847.7 1.2 1.0X
+OffHeap 0 0
0 604.1 1.7 0.7X
+
+OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putInts (int) count=64: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 2212.3 0.5 1.0X
+OffHeap 0 0
0 2504.3 0.4 1.1X
+
+OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putInts (int) count=512: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 2609.3 0.4 1.0X
+OffHeap 0 0
0 4753.5 0.2 1.8X
+
+OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putInts (int) count=4096: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 2 2
0 2762.7 0.4 1.0X
+OffHeap 1 1
0 5596.9 0.2 2.0X
+
+OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putInts (int) count=65536: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 24 24
1 2785.7 0.4 1.0X
+OffHeap 12 12
0 5649.9 0.2 2.0X
+
+OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putLongs (long) count=1: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 111.1 9.0 1.0X
+OffHeap 0 0
0 95.6 10.5 0.9X
+
+OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putLongs (long) count=8: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 818.8 1.2 1.0X
+OffHeap 0 0
0 604.1 1.7 0.7X
+
+OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putLongs (long) count=64: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 2213.0 0.5 1.0X
+OffHeap 0 0
0 1625.0 0.6 0.7X
+
+OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putLongs (long) count=512: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 2614.6 0.4 1.0X
+OffHeap 0 0
0 1771.5 0.6 0.7X
+
+OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putLongs (long) count=4096: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 2 2
0 2738.5 0.4 1.0X
+OffHeap 2 2
0 1778.7 0.6 0.6X
+
+OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putLongs (long) count=65536: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 24 24
0 2785.5 0.4 1.0X
+OffHeap 38 38
1 1789.2 0.6 0.6X
+
+OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putNulls ((no value)) count=1: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 103.9 9.6 1.0X
+OffHeap 0 0
0 82.0 12.2 0.8X
+
+OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putNulls ((no value)) count=8: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 739.6 1.4 1.0X
+OffHeap 0 0
0 499.1 2.0 0.7X
+
+OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putNulls ((no value)) count=64: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 2186.4 0.5 1.0X
+OffHeap 0 0
0 1141.0 0.9 0.5X
+
+OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putNulls ((no value)) count=512: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 0 0
0 2607.9 0.4 1.0X
+OffHeap 0 0
0 1368.5 0.7 0.5X
+
+OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putNulls ((no value)) count=4096: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 2 2
0 2767.9 0.4 1.0X
+OffHeap 3 3
0 1406.1 0.7 0.5X
+
+OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1013-azure
+AMD EPYC 9V74 80-Core Processor
+putNulls ((no value)) count=65536: Best Time(ms) Avg Time(ms)
Stdev(ms) Rate(M/s) Per Row(ns) Relative
+------------------------------------------------------------------------------------------------------------------------
+OnHeap 24 24
0 2791.6 0.4 1.0X
+OffHeap 48 48
0 1410.1 0.7 0.5X
+
+
diff --git
a/sql/core/src/test/scala/org/apache/spark/sql/execution/vectorized/WritableColumnVectorBulkFillBenchmark.scala
b/sql/core/src/test/scala/org/apache/spark/sql/execution/vectorized/WritableColumnVectorBulkFillBenchmark.scala
new file mode 100644
index 000000000000..59528831d65d
--- /dev/null
+++
b/sql/core/src/test/scala/org/apache/spark/sql/execution/vectorized/WritableColumnVectorBulkFillBenchmark.scala
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.sql.execution.vectorized
+
+import org.apache.spark.benchmark.{Benchmark, BenchmarkBase}
+import org.apache.spark.sql.types._
+
+/**
+ * Low-level benchmark for `WritableColumnVector`'s constant-value bulk-fill
APIs:
+ * `putBooleans(rowId, count, value)`, `putBytes(rowId, count, value)`,
+ * `putShorts(rowId, count, value)`, `putInts(rowId, count, value)`,
+ * `putLongs(rowId, count, value)`, `putNulls(rowId, count)`.
+ *
+ * The count sweep spans from very short runs (where call overhead dominates)
to long
+ * fills (where intrinsics such as `Arrays.fill` / `Unsafe.setMemory` should
pay off):
+ *
+ * counts = 1, 8, 64, 512, 4096, 65536
+ *
+ * Each timed case repeats one bulk fill `INNER_ITERS` times on the same
column vector
+ * so the steady-state cost dominates per-iteration timer overhead. A
`@volatile` sink
+ * read at the end of the inner loop blocks JIT from dead-code-eliminating the
fills
+ * (`Arrays.fill` on a non-escaping array is otherwise removable).
+ *
+ * To run this benchmark:
+ * {{{
+ * 1. build/sbt "sql/Test/runMain <this class>"
+ * 2. generate result:
+ * SPARK_GENERATE_BENCHMARK_FILES=1 build/sbt "sql/Test/runMain <this
class>"
+ * Results in
"benchmarks/WritableColumnVectorBulkFillBenchmark-results.txt".
+ * 3. GHA: `Run benchmarks` workflow, class =
`*WritableColumnVectorBulkFill*`.
+ * }}}
+ */
+object WritableColumnVectorBulkFillBenchmark extends BenchmarkBase {
+
+ // Capacity must be >= max(counts) so a single fill covers the requested
range.
+ private val CAPACITY = 65536
+ private val INNER_ITERS = 1024
+ private val NUM_ITERS = 5
+
+ private val COUNTS = Seq(1, 8, 64, 512, 4096, 65536)
+
+ // @volatile sinks prevent JIT from dead-code-eliminating the fills. Read one
+ // element of the just-filled range into each sink at the end of every inner
iter.
+ @volatile private var byteSink: Byte = 0
+ @volatile private var shortSink: Short = 0
+ @volatile private var intSink: Int = 0
+ @volatile private var longSink: Long = 0L
+
+ private def runFor(
+ label: String,
+ typeName: String,
+ newOnHeap: () => WritableColumnVector,
+ newOffHeap: () => WritableColumnVector,
+ doFill: (WritableColumnVector, Int) => Unit,
+ readSink: (WritableColumnVector, Int) => Unit): Unit = {
+ // One Benchmark per count so the "Per Row (ns)" column reports
per-element cost.
+ // Within a Benchmark, all cases must share the same num: OnHeap and
OffHeap both
+ // do INNER_ITERS * count elements per case.
+ COUNTS.foreach { count =>
+ val benchmark = new Benchmark(
+ s"$label ($typeName) count=$count",
+ (INNER_ITERS.toLong) * count, NUM_ITERS, output = output)
+
+ val onHeap = newOnHeap()
+ doFill(onHeap, count) // warm
+ readSink(onHeap, count - 1)
+ benchmark.addCase("OnHeap") { _ =>
+ var i = 0
+ while (i < INNER_ITERS) {
+ doFill(onHeap, count)
+ readSink(onHeap, count - 1)
+ i += 1
+ }
+ }
+
+ val offHeap = newOffHeap()
+ doFill(offHeap, count)
+ readSink(offHeap, count - 1)
+ benchmark.addCase("OffHeap") { _ =>
+ var i = 0
+ while (i < INNER_ITERS) {
+ doFill(offHeap, count)
+ readSink(offHeap, count - 1)
+ i += 1
+ }
+ }
+ benchmark.run()
+ }
+ }
+
+ override def runBenchmarkSuite(mainArgs: Array[String]): Unit = {
+ runBenchmark("WritableColumnVector bulk fill") {
+
+ // putBooleans(rowId, count, value=true)
+ runFor("putBooleans", "boolean",
+ () => new OnHeapColumnVector(CAPACITY, BooleanType),
+ () => new OffHeapColumnVector(CAPACITY, BooleanType),
+ (v, n) => v.putBooleans(0, n, true),
+ (v, idx) => byteSink = (if (v.getBoolean(idx)) 1 else 0).toByte)
+
+ // putBytes(rowId, count, value=42)
+ runFor("putBytes", "byte",
+ () => new OnHeapColumnVector(CAPACITY, ByteType),
+ () => new OffHeapColumnVector(CAPACITY, ByteType),
+ (v, n) => v.putBytes(0, n, 42.toByte),
+ (v, idx) => byteSink = v.getByte(idx))
+
+ // putShorts(rowId, count, value=42)
+ runFor("putShorts", "short",
+ () => new OnHeapColumnVector(CAPACITY, ShortType),
+ () => new OffHeapColumnVector(CAPACITY, ShortType),
+ (v, n) => v.putShorts(0, n, 42.toShort),
+ (v, idx) => shortSink = v.getShort(idx))
+
+ // putInts(rowId, count, value=42) -- already optimized in SPARK-57024
for OnHeap;
+ // included for reference / regression detection.
+ runFor("putInts", "int",
+ () => new OnHeapColumnVector(CAPACITY, IntegerType),
+ () => new OffHeapColumnVector(CAPACITY, IntegerType),
+ (v, n) => v.putInts(0, n, 42),
+ (v, idx) => intSink = v.getInt(idx))
+
+ // putLongs(rowId, count, value=42L)
+ runFor("putLongs", "long",
+ () => new OnHeapColumnVector(CAPACITY, LongType),
+ () => new OffHeapColumnVector(CAPACITY, LongType),
+ (v, n) => v.putLongs(0, n, 42L),
+ (v, idx) => longSink = v.getLong(idx))
+
+ // putNulls(rowId, count) -- already optimized in SPARK-57024; reference
baseline.
+ // isAllNull() is type/flag-driven, not state-driven, so repeated
putNulls on the
+ // same vector still executes the fill (does not early-out).
+ runFor("putNulls", "(no value)",
+ () => new OnHeapColumnVector(CAPACITY, IntegerType),
+ () => new OffHeapColumnVector(CAPACITY, IntegerType),
+ (v, n) => v.putNulls(0, n),
+ (v, idx) => intSink = if (v.isNullAt(idx)) 1 else 0)
+ }
+ }
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]