Skip to content

Commit 1dfd71d

Browse files
mkitticlaude
andcommitted
tests: Add near-miss power-of-2 shape (33,33,33) to benchmarks
Documents the performance penalty when a shard shape is just above a power-of-2 boundary, causing n_z to jump from 32,768 to 262,144. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 267a6c4 commit 1dfd71d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/benchmarks/test_indexing.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ def read_with_cache_clear() -> None:
108108
large_morton_shards = (
109109
(32,) * 3, # With 1x1x1 chunks: 32x32x32 = 32768 chunks per shard (power-of-2)
110110
(30,) * 3, # With 1x1x1 chunks: 30x30x30 = 27000 chunks per shard (non-power-of-2)
111+
(33,) * 3, # With 1x1x1 chunks: 33x33x33 = 35937 chunks per shard (near-miss: just above power-of-2)
111112
)
112113

113114

@@ -204,6 +205,7 @@ def read_with_cache_clear() -> None:
204205
(20, 20, 20), # 8000 elements (non-power-of-2)
205206
(32, 32, 32), # 32768 elements (power-of-2)
206207
(30, 30, 30), # 27000 elements (non-power-of-2)
208+
(33, 33, 33), # 35937 elements (near-miss: just above power-of-2, n_z=262144)
207209
)
208210

209211

0 commit comments

Comments
 (0)