-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Use aligned_alloc when the platform we use supports it #70473
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
Conversation
22180a0 to
24c3d7b
Compare
|
@ahoppen Could you please initiate the test? |
|
I’m not at all familiar with this code. @jckar Looks like you wrote it originally 10 years ago, could you take a look? |
c143768 to
0ed083b
Compare
|
@compnerd can we please test this |
|
@AtariDreams I like the premise of the change, but I do not believe that the change is correct. The second condition for Windows needs to be changed to |
Fixed! |
Just checked, and Microsoft's C runtime does not support it, so thank you. |
aligned_alloc is the preferred way to do AlignedAlloc when we can support that, with the other code being a fallback if that is not the case.
|
@swift-ci please test |
|
@swift-ci please benchmark |
|
@compnerd Thoughts? Things passed but benchmarks are wishy-washy |
|
I think that we can run them once again to see if they are stable or just noise |
|
@swift-ci please benchmark |
|
FWIW, I do not expect this to impact the benchmarks in any meaningful way (if there is a bit of noise, it is likely for cache line behaviour). |
|
@compnerd benchmarks seem fine |
|
Yeah, I agree, sounds like it is mostly noise. Going to merge this. |
aligned_alloc is the preferred way to do AlignedAlloc when we can support that, with the other code being a fallback if that is not the case.