You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You probably want to at least look at the POSIX getline/getdelim API. The reason is so that the control flow for the hot path can be "read buffer, memchr(..delim), maybe read more, ...". Doing this correctly can get you within around 1.25 .. 1.5x of memory mapped IO (which uses just the memchr part).
EDIT: you likely already know, but while this is a good thing to have, one of the downsides of this is that any FFI called/client code will not be able to "just use" the same "stdin/out/err" File objects, but will have to use your mirror of them for buffering to be coherent.
Currently
files
only provide low-level read/write primitives. These are not buffered, so convenience likereadLine
are not available.Goals:
Stream
can be plugged intoBufferedStream
and receive all the perks.The text was updated successfully, but these errors were encountered: