Closed 9x14S closed 1 year ago
This is deliberate, actually. We used to allocate more bytes at a time but decided to simplify the code, particularly since the human is the bottleneck with get_string
, not the underlying system calls.
As written, too, looks like this PR risks overflowing capacity
, fyi!
The inefficiency lies at the repeated calling of realloc() to make space for each character read just for the buffer to be minimized at the end.