3 ms·
That's most likely because of the overhead of all those syscalls for each line. A nicer way to do such things is to open the file with mmap, which does one sys
by lucian1900 15y ago
That's most likely because of the overhead of all those syscalls for each line.
A nicer way to do such things is to open the file with mmap, which does one system call and then just bumps a pointer. mmaps expose both a file and a list-like API.
- deleted 15y ago[deleted]