Skip to content

Avoid allocations when sorting#751

Merged
frankmcsherry merged 1 commit intoTimelyDataflow:masterfrom
frankmcsherry:unstable_sort
Feb 28, 2026
Merged

Avoid allocations when sorting#751
frankmcsherry merged 1 commit intoTimelyDataflow:masterfrom
frankmcsherry:unstable_sort

Conversation

@frankmcsherry
Copy link
Member

We've historically used sort() rather than sort_unstable() for performance reasons (the unstable sorting only performed well for branchless comparisons). Not sure if that has changed at all, but it's now clear that stable sorting is the main source of transient allocations in otherwise stationary dataflows. E.g. the event_driven.rs benchmark performs no allocations once up and running with these changes, and .. does really quite a lot of allocations without.

@frankmcsherry frankmcsherry merged commit a1b27df into TimelyDataflow:master Feb 28, 2026
7 checks passed
@frankmcsherry frankmcsherry deleted the unstable_sort branch February 28, 2026 00:07
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.

1 participant