[armedbear-devel] progress on Maxima + ABCL -- light at the end of the tunnel!
ehuels at gmail.com
Thu Aug 6 10:51:11 UTC 2009
On Wed, Aug 5, 2009 at 10:40 PM, Robert Dodier<robert_dodier at yahoo.com> wrote:
> Erik, thanks for looking into the problem.
> --- On Wed, 8/5/09, Erik Huelsmann <ehuels at gmail.com> wrote:
>> in SPRDET.lisp, there's a top-level special declaration of the
>> variable name X.
>> In ABCL, there's a non-trivial difference between
>> evaluation of a special variable versus a local variable.
>> So, renaming the special variable could be a solution, but
>> that would require a change on part of Maxima;
> In this case, there is no problem with changing
> Maxima, e.g. rename X to *X* or just cut out the
> special declaration (glancing at the code,
> it seems the declaration may be unnecessary).
> As you know, Maxima is an archaic program.
> This business about special X falls under the
> heading of "general clean-up" to me.
>> I'm thinking about how to revert
>> the side effect at the end of the file compilation.
> Well, there is a (DECLARE-TOP (UNSPECIAL X)) later on.
> I guess what is needed is an implementation of
> "unspecial" for ABCL.
Well, for the purpose of testing the performance impact of being able
to declare "unspecial", I hacked into ABCL an UNDEFVAR primitive
function and adjusted lmdcls.lisp accordingly.
The change takes ABCL from ~3300 seconds to ~ 2020 seconds evaluation
time for Maxima's test suite.
However, I'm hesitant to provide the functionality as I've re-run the
profiler and this is the new output:
35.8 211251 TMS
36.6 216078 TIMESIN
38.3 226175 SIMPTIMES
40.0 236302 GREAT
45.8 270172 KINDP
59.3 349696 MEVAL1
67.9 400737 MEVAL
77.4 456717 DLSF
84.7 499631 DLS
91.2 538251 DGRF
99.0 583971 SIMPLIFYA
100.0 590104 DGR
As a conclusion DGR and DLS are still among the hotest spots in the
execution. So, I checked the disassembly again (which is how I
discovered about X being taken to be special). From the disassembly, I
gather that one of the DO variables (L) is taken to be special too.
Searching through the Maxima sources I'm not finding where the
specialness comes from...
It looks to me like - although I agree with you about the archaic
nature of it - that Maxima would greatly benefit from (at least with
ABCL) specials to be defined more locally: it's more Common Lisp if it
I'm thinking about not-implementing the make-unspecial, but the spec
allows special declarations to be dropped at the end of a file
compilation. I'm thinking about implementing that; it would seem to me
it's more what users expect and doesn't add a non-standard feature.
I suppose that will eliminate the specialness of L in DGR too.
What would you say?
More information about the armedbear-devel