Skip to content
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

Aligned allocation #24

Open
sampotter opened this issue Nov 24, 2020 · 3 comments
Open

Aligned allocation #24

sampotter opened this issue Nov 24, 2020 · 3 comments

Comments

@sampotter
Copy link

sampotter commented Nov 24, 2020

This seems like a very nice and useful little library. Definitely fills a need.

Would you be willing to include support for aligned allocation? This is handled a little differently on each platform, and providing a nice, platform independent interface to it that "just works" would be quite useful.

For instance, if you see lines 12-43 in this file, you can see my own attempt at this. Frankly, I have no confidence that I've done this the right way. :-)

(I'm considering using cymem in the library linked to above. Intel's Embree library requires memory to be allocated with alignment.)

@honnibal
Copy link
Member

Yes I'd be interested in that. We have support for changing the allocation function, so in theory aligned allocation shouldn't be so hard.

The problem I have with aligned allocation is I never feel like I've done it properly =/. So I've never really seen a big performance increase.

@sampotter
Copy link
Author

sampotter commented Nov 25, 2020

I don't have enough experience with it to know when exactly to expect a performance boost. You need to use it in order to take full advantage of SIMD vectorization. I understand your uncertainty... In my case, it's simply a requirement for using Embree---memory that the user allocates must be allocated with a specific alignment.

What can I do to help?

@polm
Copy link

polm commented Sep 19, 2021

Sorry for the very late reply here, but if you want to start work on a PR for this I think we'd be happy to look at it.

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

No branches or pull requests

3 participants