Phil R. Karn (firstname.lastname@example.org)
19 Jul 88 20:14:33 GMT
In my PC implementation, the Telnet receive code first scans a receive
buffer for the IAC character using the memchr() C library routine. This
is a fast binary search routine implemented in assembler; it is
analogous to the strchr() (aka index) routine for ascii strings. If the
search fails, the entire buffer is written directly to the screen
driver. If the search succeeds, then the usual character-by-character
processing is done, and stdio output buffering keeps the number of
output driver calls to a reasonable minimum.
This buys a little, but not all that much since the PC's screen output
routine probably accounts for most of the CPU cycles anyway.
This archive was generated by hypermail 2.0b3 on Thu Mar 09 2000 - 14:42:51 GMT