Xref: utzoo comp.unix.wizards:10860 comp.sys.att:4160 Path: utzoo!utgpu!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!nosc!ucsd!rutgers!bellcore!tness7!petro!iquery!matt From: matt@iquery.UUCP (Matt Reedy) Newsgroups: comp.unix.wizards,comp.sys.att Subject: Fastest way to output to terminal Keywords: tty stdout fast Message-ID: <136@iquery.UUCP> Date: 2 Sep 88 13:14:32 GMT Organization: Programmed Intelligence, San Antonio Lines: 21 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