Skip to content

perf[array]: cast to prim faster#8062

Merged
joseph-isaacs merged 5 commits into
developfrom
ji/cast-prim-better
May 22, 2026
Merged

perf[array]: cast to prim faster#8062
joseph-isaacs merged 5 commits into
developfrom
ji/cast-prim-better

Conversation

@joseph-isaacs
Copy link
Copy Markdown
Contributor

@joseph-isaacs joseph-isaacs commented May 22, 2026

Remove a double pass of the array, once for min/max another to cast.

Can try to reinterpret the same buffer.

u
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
@joseph-isaacs joseph-isaacs added the changelog/performance A performance improvement label May 22, 2026
@joseph-isaacs joseph-isaacs requested a review from robert3005 May 22, 2026 12:55
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 22, 2026

Merging this PR will improve performance by 17.26%

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 3 improved benchmarks
✅ 1248 untouched benchmarks

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation chunked_varbinview_opt_canonical_into[(1000, 10)] 225.2 µs 187.8 µs +19.91%
Simulation new_alp_prim_test_between[f32, 16384] 118 µs 104 µs +13.46%
Simulation new_alp_prim_test_between[f32, 32768] 181.8 µs 153.4 µs +18.5%

Tip

Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.


Comparing ji/cast-prim-better (3f7fa53) with develop (1241e14)

Open in CodSpeed

Comment thread vortex-array/src/arrays/primitive/compute/cast.rs Outdated
u
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
@joseph-isaacs joseph-isaacs marked this pull request as ready for review May 22, 2026 14:47
u
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
@joseph-isaacs joseph-isaacs requested a review from robert3005 May 22, 2026 14:48
u
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
@joseph-isaacs joseph-isaacs enabled auto-merge (squash) May 22, 2026 14:49
u
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
@joseph-isaacs joseph-isaacs merged commit 251e603 into develop May 22, 2026
66 checks passed
@joseph-isaacs joseph-isaacs deleted the ji/cast-prim-better branch May 22, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/performance A performance improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants