You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 45a683a
Browse filesBrowse the repository at this point in the historyBrowse files
Masked tail variants of the addition with five sizes on the i7-12700H
vectorMaskedTail was about 30 percent slower than vector with 100,003
elements but not with 1,003. This run adds 103 and 10,003 elements to
see where the gap starts: up to 10,003 elements, vectorMaskedTail stays
within 25 percent of vector (918 against 913 ns/op at 10,003), and only
with 100,003 elements is it clearly slower (14,075 against 10,329 ns/op).
Copy file name to clipboardExpand all lines: results/12th-gen-intel-core-i7-12700h-x64/benchmarks/supplementary/README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,7 @@ The machine is a laptop with a 12th Gen Intel Core i7-12700H (AVX2, no AVX-512,
15
15
|`add-masked-tail-with-and-without-tail`|`AddBenchmark.vector` and `vectorMaskedTail` with 100,000, 100,003 and 100,008 elements. Without a tail (100,000 and 100,008), both are equally fast; only with the masked tail (100,003) is `vectorMaskedTail` consistently slower, in all forks of all four runs at this size (13.0 to 14.0 µs). A single masked iteration should cost nanoseconds, not about 3 µs; the cause could not be determined, since WSL2 exposes no hardware performance counters |
16
16
|`add-alignment-sweep`|`AddAlignmentBenchmark.vectorAfterHead` with `head` = 0 to 7 and `AddBenchmark.scalar`, with 1,000 and 100,000 elements, with `-XX:-UseCompactObjectHeaders -XX:ObjectAlignmentInBytes=32`. With these flags, every float array starts 16 bytes after a 32-byte boundary, and `vectorAfterHead` starts the vector loop only after `head` scalar elements, which shifts all vector accesses by `head` × 4 bytes; `head` = 4 puts them on 32-byte boundaries, the width of the AVX2 vectors |
17
17
|`add-scalar-12-byte-offset`|`AddBenchmark.scalar` with 1,000 and 100,000 elements and `-XX:ObjectAlignmentInBytes=32` with compact object headers (the default), which puts the first element of every float array 12 bytes after a 32-byte boundary instead of 16. The auto-vectorized loop stays as fast (32.4 ns/op with 1,000 elements, against 32.6 in `add-alignment-sweep`), because C2 adapts its scalar pre-loop to the offset (see `../../jit/assembly/README.md`) |
18
+
|`add-masked-tail-sizes`|`AddBenchmark.vector`, `vectorMasked` and `vectorMaskedTail` with 7, 103, 1,003, 10,003 and 100,003 elements, all sizes with a partial last vector, to see whether `vectorMaskedTail` is slower than `vector` only with 100,003 elements |
18
19
19
20
`vectorMasked` was about three times slower than `vector` with 1,003 elements, so a short diagnostic run with `-XX:+PrintIntrinsics` followed; `masked-tail-intrinsics.txt` holds the lines of intrinsics C2 could not inline (marked `**`), with their counts.
0 commit comments