Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!think!husc6!bu-cs!bucsb.bu.edu!madd From: madd@bucsb.bu.edu.UUCP (Jim "Jack" Frost) Newsgroups: comp.sys.ibm.pc Subject: Character I/O speed in Turbo Pascal Message-ID: <644@bucsb.bu.edu.UUCP> Date: Mon, 8-Dec-86 14:59:40 EST Article-I.D.: bucsb.644 Posted: Mon Dec 8 14:59:40 1986 Date-Received: Wed, 10-Dec-86 03:39:41 EST Reply-To: madd@bucsb.UUCP (Jim "Jack" Frost) Distribution: net Organization: ODO (Organization for the Disorganization of Organization) Lines: 27 Keywords: How fast can it be? Mood: Thoughtful Not too long ago there was talk about Turbo Pascal's "speed" as compared to other languages. Many people commented on the slow character input speed when using Turbo Pascal when compared to other languages, most notably C. While working on a program to replace MORE.COM on my computer with something faster and more useful, I had to find a way to make character IO fast. Speeding up output is easy: all you have to to is write reasonably efficient routines that write directly to the screen buffer. But getting a character oriented input to be faster seemed like a problem. But most people over- look Turbo Pascal's high-speed IO functions, blockread and blockwrite. By setting up your own buffer and using these functions, you can get speed increaes up to twice the speed (roughly, I didn't run any benchmarks) for normal. I'm working on a generalized set of routines if anyone's interested. Also, the MORE that I created is done. Anyone interested in one that allows scrolling both forward and backward through files and piped output? Works much like the "less" program found on some UNIX machines. Email for information and/or requests. -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - Jim Frost * The Madd Hacker - UUCP: ..!harvard!bu-cs!bucsb!madd | ARPANET: madd@bucsb.bu.edu CSNET: madd%bucsb@bu-cs | BITNET: cscc71c@bostonu -------------------------------+---+------------------------------------ "Oh beer, oh beer." -- Me | [=(BEER) <- Bud the Beer (cheers!)