Is there any reasons to not use "mmap" to read files?

rempas rempas at tutanota.com
Sat Feb 12 13:15:16 UTC 2022


On Tuesday, 8 February 2022 at 21:37:29 UTC, sarn wrote:
>
> One reason to use read/write based I/O by default is that it's 
> more versatile.  It's kind of like an input range versus a 
> random access in Phobos.
>
> ```
> // Could not map file /dev/stdin (Invalid argument)
> auto f = new MmFile("/dev/stdin");
> ```

Yeah, thank you! I will open and read the whole file anyways so 
it seems that it makes sense to try with this method and then 
measurement my program in the future to see! Have a nice day!


More information about the Digitalmars-d mailing list