[comp.sys.ibm.pc] Character I/O speed in Turbo Pascal

madd@bucsb.bu.edu.UUCP (Jim "Jack" Frost) (12/08/86)

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!)