microsoft / microsoft/mimalloc
Question about memory locality effects
- Dominant language
- C
- Stars
- 13.4k
- Forks
- 1.2k
- Avg merge
- 4d 45m
- Merged PRs (30d)
- 13
Description
(I'm not sure if a github issue is the best place to ask a question like this, but at least it's public, in case anyone else might be curious about the same thing.)
One of the basic claims of this project is that allocating objects within the same 64KB memory allocator page increases memory locality, which increases performance.
The question I have is: what are the (primary) mechanisms behind this?
Possibilities I can think of:
* Greater probability of objects occupying the same 64B cache line
* Greater probability of objects occupying the same 4KB VM page
* Maybe the prefetcher is more effective
* Maybe something related to cache line aliasing -- 64KB happens to be around the size of a typical L1 cache, and IIUC cache lines within the same 64KB span won't alias each other in a 64KB cache, whereas they could if they're farther apart
Which of these is real and significant? Is there any other notable effect?
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue names no file, test, or entry point. Begin by locating the 64KB allocator-page claim in the project materials and compare the proposed cache, VM-page, prefetcher, and aliasing effects; done would be a documented, evidence-backed answer.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- performance
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100