mmap file performance

Andy Valencia dont at spam.me
Mon Apr 15 16:13:41 UTC 2024


On Monday, 15 April 2024 at 08:05:25 UTC, Patrick Schluter wrote:
> The setup of a memory mapped file is relatively costly. For 
> smaller files it is a net loss and read/write beats it hands 
> down.

Interestingly, this performance deficit is present even when run 
against the largest conveniently available file on my 
system--libQt6WebEngineCore.so.6.4.2 at 148 megs.  But since this 
reproduces in its C counterpart, it is not at all a reflection of 
D.

As you say, truly random access might play to mmap's strengths.

My real point is that, whichever API I use, coding in D was far 
less tedious; I like the resulting code, and it showed no 
meaningful performance cost.



More information about the Digitalmars-d-learn mailing list