Richard J. Fateman wrote:
> You will probably find the time on ACL4.3 is faster, but looking at
> your lisp code I could not find the benchmark that you
> actually ran for the times.
Sorry, it isn't very evident from looking at the code, is it? I should
add a comment or something.The timing call is in run-cn2:
(defun run-cn2 (examples)
(print-rules (time (cn2 examples))))
A problem with this is that the call to (time) prints the timing info
before the rules are printed, so that you have to spool the output back
to see the time.
> Also, setting the compiler
> optimization to (speed 3)(debug 0) may speed it up if you
> have not done so already.
ACL/Win, in my experience, seems to ignore compiler hints. The only
thing I've ever been able to do to increase performance is to use the
i+, i=, i> etc. functions when I know I'm using fixnums.
The ACL 4.3 Linux benchmark I ran used hints, though. I tried adding
type declarations too, but they seemed to have no effect.
> Before spending much time on speeding up code, I recommend
> strongly that you profile it to see where time is being spent.
Most of the time (over 90%) is spent in specialise-domain and the
functions it calls. Withinspecialise-domain, filter-examples and assess
account for most of the time. Within assess,
evaluate-rank and potential-rank account for most of the time.
Surprisingly, very little time is
spent in toss-onto-heap or significant-p.
I still can't get over the 2.5 second times I'm getting with 4.3 Linux.
That is just astonishingly fast. I may never program in anything else
ever again.