Skip to content

perf(alloc): feature for sort_unstable#26

Merged
sstadick merged 4 commits into
sstadick:masterfrom
openplayuk:sort-unstable
Jun 16, 2026
Merged

perf(alloc): feature for sort_unstable#26
sstadick merged 4 commits into
sstadick:masterfrom
openplayuk:sort-unstable

Conversation

@jameslkingsley

Copy link
Copy Markdown
Contributor
  • Adds a feature flag for using sort_unstable instead of sort
  • Uses conditional compilation instead of cfg! to avoid adding branches
  • sort_unstable reduces allocations but can be slower if the Vec is already partially sorted

@sstadick

Copy link
Copy Markdown
Owner

Hi @jameslkingsley - not sure how this slipped by me, I will take a look this week. Thank you for the PR!

@sstadick

Copy link
Copy Markdown
Owner

Did you happen to get any initial bench numbers on this?

@jameslkingsley

Copy link
Copy Markdown
Contributor Author

Think I did run a bench but I didn't save the results anywhere

@sstadick

Copy link
Copy Markdown
Owner

@jameslkingsley - openplayuk#1

This adds a benchmark (sort-unstable is faster 👍) and fixes the CI issue / adds the version bump and changelog updates. If you want to review that and merge it into what you have, I can then merge this in.

Or if you'd prefer I can just pull all the changes in from there. Just lmk

@jameslkingsley

Copy link
Copy Markdown
Contributor Author

@sstadick awesome, all looks good, merged 👍🏻
Thanks!

@sstadick sstadick merged commit c545d40 into sstadick:master Jun 16, 2026
5 checks passed
@sstadick

Copy link
Copy Markdown
Owner

See version 1.3.0

Thanks for the PR @jameslkingsley !

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants