[Openmcl-devel] slow read-char  Gary Byers gb at clozure.com Thu
Jul 20 14:47:39 EDT 2006  On Thu, 20 Jul 2006, Gail Zacharias
wrote:  > At 7/20/2006 06:15 AM, Gary Byers wrote: >> The good
news is that I was able to get about a 3X speedup of a test >>
case that READ-CHARs 2M characters from a file by making things
like >> OPEN and MAKE-SOCKET accept a :PRIVATE argument (which
effectively >> makes the resulting stream permanently locked by
the calling thread >> and eliminates the per-character locking
overhead); > Does it actually prevent the stream from being used
by other threads? > It would be useful to have streams that are
usable in multiple threads > but just assume that locking
happens at a higher level.  I had thought that - assuming that
there's a cheap way of "transferring ownership" of a stream -
that any sort of higher-level locking protocol would/could just
do that transfer as a fairly small step. but I'm not sure that
that's true.  (It might be a small step, but it might also be an
awkward one;