[plt-scheme] port -> file/line/column ?

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Thu Oct 10 15:28:59 EDT 2002

At Thu, 10 Oct 2002 00:27:49 +0400 (MSD), Kirill Lisovsky wrote:
> On Wed, 9 Oct 2002, Matthew Flatt wrote:
> 
> > The overhead is high for tasks that read large blocks from a file. For
> > example, the `copy-port' operation in the following program takes twice
> > as long when the fourth line is uncommented.
> > 
> Actually, I'm about SSAX which is `read-char' based.
> What would you say about `read-char' / `peek-char' overhead ?

Low. But I'd be uncomfortable treating `read-char'/`peek-char' as a
special case.

> Well, what's about a "global" customization of this behaviour?
> 
> Say, 
> (ports-count-lines #t)
> for compatibility and convenience
> 
> (ports-count-lines #f)
> for large blocks IO speed?

Ok --- I'll add a parameter (defaulting to #f, of course).

Matthew



Posted on the users mailing list.