2 comments

[ 2.7 ms ] story [ 15.3 ms ] thread
I'm interested in learning more about the performance possibilities of mmap for the case read-only X 64-bit-only and found this interesting article by Justin Willmert [0] from 2020-11-05 on using the Linux-specific MAP_POPULATE flag to prefault memory on a single-thread to increase performance.

Surprisingly, the article didn't appear to have been submitted previously when I searched for its URL.

And seeing as there are lots of HN folks who know a lot more about it than me, I submitted it to see what I could learn from the comments.

Edit 0: also found that it wasn't on archive.org so I submitted it there [1].

Edit 1: and just to make sure that this nice article is saved for posterity, I submitted it to archive.is too [2].

[0] https://justinwillmert.com/about/ "an experimental physicist with an affinity for modeling and analysis. I am particularly interested in melding computational physics and software engineering to solve novel problems."

[1] https://web.archive.org/web/20210810021537/https://justinwil...

[2] https://archive.is/VjtSh

I looked at the source code for UnixMaps.jl. It seems to call :jl_mmap (exported by Julia's underlying C++ source code). I wonder why this style might be preferred to, say, calling libc directly?