Skip to content

Add repeated array that repeats a child array n times - #10950

Open
robert3005 wants to merge 5 commits into
developfrom
rk/tiled-array
Open

robert3005 wants to merge 5 commits into
developfrom
rk/tiled-array

Conversation

@robert3005

@robert3005 robert3005 commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

TiledArray repeats its child end to end count times. Execution decodes
the child once and appends it per tile via Chunked; scalar_at wraps the
index; validity tiles the child's validity. Reduce rules collapse empty,
single-count, constant-child and nested tiles, and slices within one tile
or over whole tiles stay cheap. It is in-memory only and not registered
for serialization.

TiledArray repeats its child end to end `count` times. Execution decodes
the child once and appends it per tile via Chunked; scalar_at wraps the
index; validity tiles the child's validity. Reduce rules collapse empty,
single-count, constant-child and nested tiles, and slices within one tile
or over whole tiles stay cheap. It is in-memory only and not registered
for serialization.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018SWbEv9WiVtYt84zf3rXEu
Signed-off-by: Claude <noreply@anthropic.com>
The fixed-size list builder's repeated-list append and constant
fixed-size list canonicalization both tiled one array by building a
ChunkedArray of n clones of it. Build a TiledArray instead, which stores
the count rather than n chunk references and offsets. The builder
optimizes the result so a constant tile collapses into one constant.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018SWbEv9WiVtYt84zf3rXEu
Signed-off-by: Claude <noreply@anthropic.com>
Rename the Tiled encoding to Repeated: the module becomes
arrays::repeated, the types RepeatedArray, RepeatedData and
RepeatedSlots, and the encoding ID vortex.repeated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018SWbEv9WiVtYt84zf3rXEu
Signed-off-by: Claude <noreply@anthropic.com>
@robert3005 robert3005 changed the title Add Tiled array that repeats a child array n times Add repeated array that repeats a child array n times Oct 29, 2026
Take the child length from the array rather than the probe, which has no
len(); use is_multiple_of; build the test builder with an explicit
allocator; and apply rustfmt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018SWbEv9WiVtYt84zf3rXEu
Signed-off-by: Claude <noreply@anthropic.com>
Optimizing the repeated elements collapses a repeated constant tile into
one constant array, so the test asserts the elements are constant rather
than a chunked array of constants.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018SWbEv9WiVtYt84zf3rXEu
Signed-off-by: Claude <noreply@anthropic.com>
@robert3005 robert3005 added the changelog/feature A new feature label Oct 29, 2026 — with Claude
@codspeed

codspeed Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Merging this PR will degrade performance by 0.06%

2 warnings

⚠️ Walltime results may be unreliable

Some benchmarks used the Walltime instrument outside CodSpeed Macro Runners, which can make the results inconsistent.

Learn more about Macro Runners

See affected benchmarks

⚠️ Base and head ran on different runner types

Some benchmarks with significant performance changes were compared across different runner types, so the changes might not come from the code. Run base and head on the same runner type, or use CodSpeed Macro Runners for more stable results.

Learn more about Macro Runners

Open the report in CodSpeed to investigate

⚡ 11 improved benchmarks
❌ 8 regressed benchmarks
✅ 2287 untouched benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ Walltime mul_u64_nonnull_neon 20.3 µs 39.2 µs -48.25%
❌ CPU Simulation filter_powerlaw_by_random[10000] 142.2 ns 267.5 ns -46.83%
❌ CPU Simulation missing_stats[16] 66.8 µs 85.6 µs -22.01%
❌ CPU Simulation bench_compare_varbin[(50000, 2)] 133.2 µs 162.5 µs -17.99%
❌ CPU Simulation bench_compare_varbin[(50000, 64)] 135 µs 164.3 µs -17.85%
❌ CPU Simulation bench_compare_sliced_dict_varbinview[(7500, 10000)] 200.6 µs 228.4 µs -12.21%
❌ CPU Simulation bench_compare_sliced_dict_varbinview[(1000, 10000)] 78.1 µs 88.8 µs -12.09%
❌ CPU Simulation bench_compare_sliced_dict_varbinview[(10000, 10000)] 206.7 µs 234.6 µs -11.87%
⚡ Walltime threshold_neon[64] 4.4 µs 2.6 µs +68.8%
⚡ CPU Simulation canonicalize_sparse_fixed_size_list[(1024, 17, 8)] 427.4 µs 300.6 µs +42.19%
⚡ Walltime filter_neon[64] 2.7 µs 2.1 µs +27.59%
⚡ CPU Simulation canonicalize_sparse_fixed_size_list[(512, 7, 4)] 461.7 µs 364.9 µs +26.51%
⚡ Walltime filter_neon[80] 3.3 µs 2.7 µs +20.39%
⚡ Walltime threshold_neon[80] 4.2 µs 3.5 µs +18.38%
⚡ CPU Simulation take_filter_primitive_small_uncached_random_mask_random_indices[4096, 10] 24.3 µs 20.8 µs +16.62%
⚡ CPU Simulation test_repeated_scan_scalar_at[int_str_float] 481.6 µs 414.5 µs +16.19%
⚡ Walltime add_constant_shapes_neon[(32768, ConstantPerRow)] 15.7 µs 14.2 µs +10.42%
⚡ Walltime add_constant_shapes_neon[(32768, PerRowConstant)] 15.7 µs 14.2 µs +10.41%
⚡ Walltime scalar_subtract_neon 11.3 µs 10.3 µs +10.15%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing rk/tiled-array (10fc9ce) with develop (d4d9234)1

Open in CodSpeed

Footnotes

  1. No successful run was found on develop (7e70afc) during the generation of this report, so d4d9234 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

Copy link
Copy Markdown
Contributor Author

CodSpeed Performance Analysis is red, but the 8 regressions don't come from this PR. Every other check on 10fc9ce is green.

  • Code path: none of the regressed benchmarks (dict_compare, filter_bool, zone_map_prune, neon mul_u64) build fixed-size lists or RepeatedArray. The PR only changes the repeated fixed-size-list builder append and constant fixed-size-list canonicalization. The benchmarks that do hit that path improved, as expected: canonicalize_sparse_fixed_size_list is 26–42% faster.

  • Local check: base 40e0b1c vs head, divan medians on the same machine:

    Benchmark Base Head
    bench_compare_varbin[(50000, 2)] 8.339 µs 8.325 µs
    bench_compare_varbin[(50000, 64)] 8.433 µs 8.439 µs
    filter_powerlaw_by_random[10000] 1.13 µs 1.138 µs
    filter_powerlaw_by_random[100000] 7.299 µs 7.307 µs
  • CodSpeed's own warning: base and head ran on different runner types.

There's no code fix to make. The regressions need acknowledging in CodSpeed to clear the check.


Generated by Claude Code

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/feature A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants