[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: :OPERATION-HANDLED-P slows READ
Date: Wed 25 Apr 90 21:11:00-CDT
From: Rich Cohen <HI.COHEN@MCC.COM>
Subject: Re: :OPERATION-HANDLED-P slows READ
To: barmar@Think.COM
cc: SWM@SAPSUCKER.SCRC.Symbolics.COM, kanderso@DINO.BBN.COM,
Customer-Reports@STONY-BROOK.SCRC.Symbolics.COM, slug@Warbucks.AI.SRI.COM
(1) :OPERATION-HANDLED-P isn't the problem
What is causing the problem then?
I don't think the time doing a MEMBER on a list of 92 elements is
going to dominate the time in READ unless you're reading many very
short, simple s-expressions. I tried to crudely time the cost of the
:OPERATION-HANDLED-P message on an open file stream, and came up with
something like 200 usec on a 3650. (My stream supported 124
operations.) I was able to get READ to read approximately 500 atoms
per second from a file that contained only atoms, but more normal
rates were 60 - 100 forms per second. This is about 10msec for each
call to READ, putting the 200usec overhead for :OPERATION-HANDLED-P
at around 2%.
I was reading short floats so the time to start up read was
significant.
(2) The performance of character streams is much faster in Rel 7.4.
Rel 7.4 only runs on Ivory, but character streams are noticibly faster
than the general speed-up of other computations on the Xl400. These
improvements get back to 36xx's in Rel 8.
Yes, but my improvement makes READing even faster.
(3) However, using READ-FROM-STRING does seem faster.
I tried a few quick, crude timing tests comparing file read times
using :STRING-IN and READ-FROM-STRING with using READ. I was
surprized that using :STRING-IN and READ-FROM-STRING was usually
faster than READ, and on a couple of files as much as 30-40% faster.
My results were fairly consistent on a given file.
I found i could reduce the variance of my timings by reading a file on
the machine i was on.
Yes, i was suprised too, and that's what got me thinking about it.
The main difference between reading from a stream or from a string is
the time of SEND and :OPERATION-HANDLED-P. The SEND times are ruffly
the same, though strings are slightly faster. However, for streams
:OPERATION-HANDLED-P is 9 times slower because the list of methods is
longer. This causes READing a stream to be about twice as slow.
READing from a dynamic window is even slower since they have over 600
operations. I'll have more to say about this in a moment.
...