Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ames!mailrus!tut.cis.ohio-state.edu!rutgers!bellcore!faline!thumper!karn From: karn@thumper.bellcore.com (Phil R. Karn) Newsgroups: comp.protocols.tcp-ip Subject: Re: telnet SUPRESS-TELNET option... Summary: IAC and performance enhancement Message-ID: <1244@thumper.bellcore.com> Date: 19 Jul 88 20:14:33 GMT References: <12413914739.7.BILLW@MATHOM.CISCO.COM> Organization: Bell Communications Research, Inc Lines: 12 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. Phil