[Openmcl-devel] slow read-char
gb at clozure.com
Thu Jul 20 10:15:24 UTC 2006
On Sat, 15 Jul 2006, Gary Byers wrote:
> On Sat, 15 Jul 2006, Takehiko Abe wrote:
>>> BTW It may not be fair to compare Openmcl and Allegro CL in READ
>>> performance, since Allegro is not native-threads on OS X.
>> I agree. MCL 5.1 does not use native (preemptive) threads either.
> I think (in hindsight) that locking inside the guts of READ-CHAR
> probably counts as a naive implementation.
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); that's on top
of some speedups that arise from tightening the code a bit, so I
guess that that's about a 4X speedup in total (and things are no
longer -that- bad.)
The bad news is that these changes (to the bleeding-edge CVS tree)
are already a little hard to bootstrap and that some further
changes would be worth persuing; it may be a few days before the
dust settles and new images/snapshots are available.
More information about the Openmcl-devel