2 ms·
If anything, it'd be slower. SQLite locks the database file (which would be another OS-level system call). Simple files are more straightforward. You do one MM
by dragontamer 9y ago
If anything, it'd be slower. SQLite locks the database file (which would be another OS-level system call).
Simple files are more straightforward. You do one MMap and then there wouldn't be any other system calls made. I'd bet that compilers are "slow" because they have to make many, many, many mmaps to do anything. Each #include turns into another MMap, which Meltdown mitigations cause a full TLB flush each time.
- Ded7xSEoPKYNsDd 9y agoMmap uses page faults instead of syscalls to read more data. Both these mechanisms require switching to the kernel and back, so it's not clear to me why it should be less affected by Meltdown patches.
- SQLite 9y agoFor reading many blobs of approx 10KB each, it is often faster to read them out of an SQLite database than from separate files on disk. See https://sqlite.org/fasterthanfs.html https://sqlite.org/fasterthanfs.html for details and to download code that you can use to test this yourself on your system. I don't know if SQLite would be faster or slower in the context suggested here. But I'd like to suggest that perhaps it is worth running the experiment before reaching a conclusion.