Richard Fateman <fateman at eecs.berkeley.edu> writes:
> There USED to be a program run just before dumping out a lisp image
> that took the operators property and put it in the front of the
> property list.
>
> It seems that it is either not there, or no longer run.
>
> The properties that are fastest to access appear to be related to TeX
> typsetting.
>
> To see the list, do :lisp (symbol-plist '%sin)
>
> I suggest that this rearrangement of the property lists of important
> symbols be put back in the stream of activities setting up the image.
>
> It could be that the test suite will not run significantly faster
> after this change, but then I am fairly sure that the implicit
> weighting of functionality in the test suite is mostly irrelevant to
> long-running symbolic calculations. I think the test suite is like a
> umpteen-point checkup given to used car: yep, there's water in the
> windshield washer, yep, there's air in the spare tire, yep, the
> ashtray is empty... It doesn't deal with the analogous issue of (say)
> gas mileage.
>
> As for whether the property list of a symbol or some other place (like
> the symbol-function slot) should be used for storing information, it
> is not clear what the advantages would be here, but placing
> information at the end of a list of 44 items does not strike me as a
> great idea. I do expect that a small hashtable would be SLOWER than a
> short property list, where "short" would have to be determined by
> timing tests. (guess: short is <20, but depends on memory speed,
> locality, caches etc.)
A quick question: Wouldn't it be easier and more robust to write
"clever" functions to set / remove properties on a symbol? We could have
a chosen order (with operators first) and the clever setter would ensure
that the property was set in the right order. My logic is that setting
and removing properties probably doesn't have to be fast. This would, of
course, remove the need for an extra build step.
Also, notice that:
CL-USER> (symbol-plist 'foo)
NIL
CL-USER> (setf (get 'foo 'a) 1)
1
CL-USER> (setf (get 'foo 'b) 1)
1
CL-USER> (symbol-plist 'foo)
(B 1 A 1)
As such, even if the build system reordered the property lists, they
would still be messed up the first time someone ran share/ code that set
properties on some symbols.
Rupert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 315 bytes
Desc: not available
URL: <http://www.math.utexas.edu/pipermail/maxima/attachments/20120805/db22413a/attachment.pgp>