>>>>> "Rupert" == Rupert Swarbrick <rswarbrick at gmail.com> writes:
Rupert> Hi there,
Rupert> I've not had much time to spend with Maxima (other than using it at
Rupert> work!) over the last few weeks, so have been feeling a nagging guilt
Rupert> about the CMUCL slow-down that was traced to my commit a while ago.
I know the cause and I have a possible solution for cmucl. It will
take some time to fix, though.
Rupert> I reverted the commit at the time, but thought I'd spend some time this
Rupert> morning trying to work out what had happened. As such, I was
Rupert> (pleasantly?) surprised to see Dan Gildea's commit 6951fd reverting my
Rupert> reversion.
Actually, I think I mentioned it, but your revert didn't seem to make
a difference. Dan's did, because he changed the new handler-case
stuff back to catch/throw.
It turns out that cmucl on x86 (but not sparc or ppc) has a
particularly bad implementation that causes cmucl to search the entire
heap to find the a handler.
Also, while looking into this, I noticed the use of catch/throw in
pnthrootp is useless. cnthroot is only called from pnthrootp, and
pnthrootp always catches anything that cnthroot would throw. Hence we
can greatly simply this by having cnthroot just return nil. I made
this change on the original handler-case version and the time for
rtest15 went down from a couple of hundred seconds to tens of seconds.
I also looked at some disassembly. The code for handler-case and error
is signficantly larger than catch/throw. If these are important, it
might really be good to continue to use catch/throw. I found that one
of the integrals in rtest15 calls rat-error tens of thousands of
times!
Ray