TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Prefaulting Memory Mapped Arrays in Julia

3 pointsby delhantyalmost 4 years ago

2 comments

delhantyalmost 4 years ago
I&#x27;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.<p>Surprisingly, the article didn&#x27;t appear to have been submitted previously when I searched for its URL.<p>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.<p>Edit 0: also found that it wasn&#x27;t on archive.org so I submitted it there [1].<p>Edit 1: and just to make sure that this nice article is saved for posterity, I submitted it to archive.is too [2].<p>[0] <a href="https:&#x2F;&#x2F;justinwillmert.com&#x2F;about&#x2F;" rel="nofollow">https:&#x2F;&#x2F;justinwillmert.com&#x2F;about&#x2F;</a> &quot;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.&quot;<p>[1] <a href="https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20210810021537&#x2F;https:&#x2F;&#x2F;justinwillmert.com&#x2F;articles&#x2F;2020&#x2F;prefaulting-memory-mapped-arrays-in-julia&#x2F;" rel="nofollow">https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20210810021537&#x2F;https:&#x2F;&#x2F;justinwil...</a><p>[2] <a href="https:&#x2F;&#x2F;archive.is&#x2F;VjtSh" rel="nofollow">https:&#x2F;&#x2F;archive.is&#x2F;VjtSh</a>
snicker7almost 4 years ago
I looked at the source code for UnixMaps.jl. It seems to call :jl_mmap (exported by Julia&#x27;s underlying C++ source code). I wonder why this style might be preferred to, say, calling libc directly?