Fastest way to output to terminal

Matt Reedy matt at iquery.UUCP
Fri Sep 2 23:14:32 AEST 1988


We have a very terminal-I/O intensive application and are attempting to 
optimize the output to the terminal. (We looked at curses but decided against
it because we needed more flexibility.)  What is the fastest way to get 
output to the terminal?  We have tried two methods:

	write ( 1, line, strlen(line) ); building and writing a line at a time
		and
	setvbuf (stdout, _IOFBF, buf, 4096 )	
	fputs (line,stdout)		using a very large buffer size

Neither of these seems to be as fast as curses.  Someone told me curses is
faster because it doesn't send very many 'locate cursor' ( tgoto (CM..) )
commands.  Is this true?  Any other ideas?

Thanks in advance.  

matt
-- 
Matthew Reedy                 UUCP: {harvard!adelie,gatech!petro}!iquery!matt
Programmed Intelligence Corp. "Lots of people without brains do alot of talking"
400 N Loop 1604 E, Suite 330  Scarecrow - "Wizard of Oz"
San Antonio, TX  78232        (512) 490 6684



More information about the Comp.unix.wizards mailing list