That it's a synonym stream (to a bivalent stream) also slows it down. 
In my measurements, READ-LINE on a bivalent input stream is about 9x 
slower than on a character-only stream, and each level of composite 
stream adds another roughly 3x. 

Additionally, and counterintuitively, READ-SEQUENCE into a string
is slower than READ-LINE on builtin streams that have no CIN buffer
than on character-only, input-only FD-STREAMs.

Anyhow, I've been working on this recently, and it's ready enough 
for review (just 2 commits at the moment):

https://github.com/kreuter/sbcl/commits/read-some-chars/

For the stream types I've covered, that approach makes READ-LINE,
READ-SEQUENCE into a string between 3.75x and 130x faster than
in 2.5.5 (an arbitrary baseline I had around). Bivalent UTF-8/linefeed 
streams are still 2.75x slower than character-only ones, but further
optimization is probably possible.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2129811

Title:
  Performance issues with reading lines from *standard-input*

To manage notifications about this bug go to:
https://bugs.launchpad.net/sbcl/+bug/2129811/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to