Skip to content

Add select_unpredictable hint to search_sorted#8225

Merged
AdamGS merged 2 commits into
developfrom
adamg/search-with-std-diff
Jun 3, 2026
Merged

Add select_unpredictable hint to search_sorted#8225
AdamGS merged 2 commits into
developfrom
adamg/search-with-std-diff

Conversation

@AdamGS

@AdamGS AdamGS commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Seems to be the main difference between the impl we have and std, docs - https://doc.rust-lang.org/std/hint/fn.select_unpredictable.html

Doesn't seem to make a difference in our benchmarks, probably worth further investigation.

Signed-off-by: Adam Gutglick <adam@spiraldb.com>
@codspeed-hq

codspeed-hq Bot commented Jun 2, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 10.6%

⚠️ 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.

❌ 1 regressed benchmark
✅ 1274 untouched benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation bitwise_not_vortex_buffer_mut[128] 246.1 ns 275.3 ns -10.6%

Tip

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


Comparing adamg/search-with-std-diff (d8d4277) with develop (81046d7)

Open in CodSpeed

@robert3005

Copy link
Copy Markdown
Contributor

those hints used to be not available outside of std, glad this changed?

@AdamGS AdamGS changed the title Try a trick from std Add select_unpredictable hint to search_sorted Jun 3, 2026
@AdamGS AdamGS marked this pull request as ready for review June 3, 2026 10:40
@AdamGS AdamGS enabled auto-merge (squash) June 3, 2026 10:41
@AdamGS AdamGS added the changelog/chore A trivial change label Jun 3, 2026
@AdamGS AdamGS disabled auto-merge June 3, 2026 10:41
@AdamGS AdamGS enabled auto-merge (squash) June 3, 2026 10:41
@AdamGS AdamGS merged commit 2d00342 into develop Jun 3, 2026
72 of 75 checks passed
@AdamGS AdamGS deleted the adamg/search-with-std-diff branch June 3, 2026 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/chore A trivial change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants