-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Revert "Fix quadratic performance of the ListMerger
in specific usage pattern"
#73808
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revert "Fix quadratic performance of the ListMerger
in specific usage pattern"
#73808
Conversation
@swift-ci smoke test |
FYI @nickolas-pohilets we'll have to make sure it works on 32bit before bringing it back. |
I confirmed that reverting these commits fixes the 32-bit build. |
@atrick, where can I see details of the 32-build failing? Can I reproduce it by cross-compiling on arm64 Mac? I've tried to use command line args for compiling
|
I believe the issue is with the combination of a 32-bit target and
That is, the header is already using 10 of the 12 words available in I think there's a relatively simple fix: you need to move |
I can make the changes, but my main struggle is to reproduce the issue and test the changes. Looks like I need <dispatch/swift_concurrency_private.h> to build this case, which does not seem to be publicly available. |
|
After moving I can loosen class DefaultActorImpl: public HeaderFooterLayout<DefaultActorImplHeader, DefaultActorImplFooter, TotalSize> {
char bytesPastTheEnd[1];
...
};
static_assert(offsetof(DefaultActorImpl, bytesPastTheEnd) <= TotalSize); |
I don't think it this TODO is about that. IMO, it is about replacing |
Reverts #70910
This fails with a 32-bit ABIs.
I suspect that the HeaderFooter TotalSize is larger than FooterSize:
That's probably because
DefaultActorImplHeader + DefaultActorImplFooter (PriorityQueue)
is larger thansizeof(HeapObject) + sizeof(void *) * NumWords_DefaultActor
I suggest revisiting the sizes provided to the layout, and the layout offset computation to ensure there aren't any subtle bugs. static assert may be useful in catching these problems.