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

[ENH] Detect rather than hardcode PAGE_SIZE #2

Open
hmacdope opened this issue Jul 15, 2024 · 2 comments
Open

[ENH] Detect rather than hardcode PAGE_SIZE #2

hmacdope opened this issue Jul 15, 2024 · 2 comments

Comments

@hmacdope
Copy link
Member

On POSIX you can get the page size from a syscall, we should try that and then default to some value, see: https://stackoverflow.com/questions/3351940/detecting-the-memory-page-size

@richardjgowers
Copy link
Member

Yeah I'm not sure if I literally want a page or if I'm misusing that term. Ideally we'd benchmark and find a sweet spot.... It might be we want to fit within a cache size or something. Maybe better would be to expose "pagesize" as an argument and do these tests. Iirc the only lower bound is that the page has to span two lines.

@hmacdope
Copy link
Member Author

Ah okay so more a buffer of set size. Yeah probably good to benchmark, but will be very cache size dependent (ofc).

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

No branches or pull requests

2 participants