Message from discussion
Lisp io performance.
From: jos...@lavielle.com (Rainer Joswig)
Subject: Re: Lisp io performance.
Date: 1999/01/19
Message-ID: <joswig-1901991641000001@pbg3.lavielle.com>#1/1
X-Deja-AN: 434441460
References: <7810mk$1ik$1@nnrp1.dejanews.com> <eAUo2.19577$W_.11064484@news1.teleport.com> <7825u0$59l@news.net-link.net> <7828av$nqt@news.net-link.net>
Organization: Lavielle EDV Systemberatung GmbH & Co.
Newsgroups: comp.lang.lisp
In article <7828av$...@news.net-link.net>, "Will Fitzgerald" <fitzger...@neodesic.com> wrote:
> Sorry, it should be:
>
> (defun fast-copy-file (src-pathname dst-pathname &optional (blocksize 8192))
> "copies a file; returns number of bytes copied"
> (with-open-file (instream src-pathname
> :direction :input :element-type 'CHARACTER)
> (with-open-file (outstream dst-pathname
> :direction :output :element-type 'CHARACTER)
> (let ((buffer (make-array blocksize :element-type 'CHARACTER)))
> (do ((pos (read-sequence buffer instream)
> (read-sequence buffer instream))
> (total 0 (+ total pos)))
> ((zerop pos) total)
> (write-sequence buffer outstream :end pos))))))
Do you really want character as the element type?
--
http://www.lavielle.com/~joswig