[Maxima-commits] CVS: maxima/src simp.lisp,1.55,1.56



----Raymond Toy <toy.raymond at gmail.com> wrote: -----

>Somehow that doesn't make any sense to me.  How many files can maxima be
>actually looking for during the whole test suite?

Try this (there is no file "abc")

 (%i1) timer(?new\-file\-search1)$
 (%i2) load("abc")$

You'll find that new-file-search1 gets called 1,016 times and each
call to new-file-search1 takes about 1 millisecond. To find a file
that exists (say facexp) requires hundreds of calls to
new-file-search1 (loading 'facexp' calls new-file-search1 794 times).
So $load is a spendy function.

My profiling data for the test suite shows that new-file-search1 gets
called 134,280 times. So maybe the test suite looks for about 130
files -- that seems reasonable. The test "rexamples" might be
responsible for most of these calls to $load.

Maybe it's not new-file-search1 that is slow, but something else. I
don't know. To a user, I doubt that the the slowness of load matters
all that much. The test suite is a poor test for the speed of Maxima,
I think. Making $load fast probably isn't worth the effort. My comment
about memq speed compared to new-file-search1 speed was wrong and
silly. Sorry.

Nevertheless, I think we should not rely on the running time for the
test suite to make comparisons of different Maxima versions.

I think new-file-search1 looks for files with "mc" extensions. If we
have standardized on "mac" extensions maybe we could speed up $load by
preventing it from looking for "mc" files.

Barton