I built two programs, one using malloc and other one using mmap. The execution time using mmap is much less than using malloc
mmap doesn't actually load the file into memory, so it will load faster, but editing it will be slower.
Another point is that mmap doesn't use any memory, but it takes up address space. On a 64bit machine, most of the memory address space will not have memory, so you could load up huge files, say 5GB, that you would not want to malloc.