|
|
|
|
|
by ajross
435 days ago
|
|
> getline() results are served from that buffer. So... it doesn't parse them once! It just does its own[1] buffering layer and implements... exactly the algorithm I described? Not seeing where you're getting the "Nope" here, except to be focusing on the one historical note about RAM that I put in parentheses. [1] Somewhat needless given the OS has already done this. It only saves the syscall overhead. |
|
The complexity of the algorithm is about the same, either the early exit is here or it isn't (in fact, the version with the early exit, now that I think of it, has larger cyclotomatic complexity but whatever).