Skip to main content
5 votes
Accepted

Reading a file into lines with mmap vs getline

You can use getline() on memory Instead of reinventing the wheel when you are using mmap(), wouldn't it be nice if you could ...
G. Sliepen's user avatar
  • 58.3k
3 votes

Reading a file into lines (benchmarking getline() vs mmap_memchr() vs mmap_getline() vs fread())

Potential overflow tv.tv_sec * 1'000'000 can readily overflow. Rather than (timestamp_t) (tv.tv_sec * 1'000'000 + tv.tv_usec) ...
chux - Reinstate Monica's user avatar
2 votes
Accepted

Reading a file into lines (benchmarking getline() vs mmap_memchr() vs mmap_getline() vs fread())

size_t vs uintmax_t You use both size_t and uintmax_t in ...
G. Sliepen's user avatar
  • 58.3k

Only top scored, non community-wiki answers of a minimum length are eligible