On 8/9/2012 12:56 PM, Robert Dodier wrote:
> On 2012-08-09, Richard Fateman <fateman at eecs.berkeley.edu> wrote:
>
>> I think that running the test suite you are using on your machine and
>> system is probably inadequate to demonstrate the improvement.
> I suppose if the result had gone the other way, you wouldn't be so
> picky.
Well, in general I think it is a mistake to view the timing of this test
suite as anything
other than "how long it takes to run the test suite". If we were
testing automobiles this
way we might sum up the time to deploy each of the cupholders, the
windshield
washer spray, the resetting of the mileage odometer, and ejecting the CD
from
the CD player, and turning the GPS system on then off.
Then when someone improved the car by (say) replacing the
GPS algorithm so the electronics drained the battery by 4% less, one
could say
Oh, our tests show it makes no difference, so let's not install that
algorithm.
>> Running the simple f(10^6) test on my computer gives 46.50 seconds
>> without the hack, and 43.58 with the hack, for a whopping 6%
>> improvement.
> Um, the test function of which you speak is even less (much less)
> representative than the test suite.
On what basis can you make that claim? The test suite is representative of
"the test suite". The function f is representative of expression
simplification of
built-in operators.
Other tests (like factoring integers) are very narrowly focussed.
Some tests (like large-scale polynomial arithmetic) are also narrowly
focussed
but on routines that can often represent bottlenecks in long-running
computations.
Oh, by the way, if you change f() so
that instead of calling sin(1)...., sin(2), ..... sin(10^6) you just
call (or rather,
simplify) sin(x), ... sin(x), ... sin(x)... it is still a winning
hack. So the idea
is: every time you dispatch to the sin, log, cos, ... simplifier, you save
enough so that overall the simplification takes 4% less, when the
simplification
process itself is relatively short.
>
>> I know of no disadvantage to the change in location of the
>> simplification program on the property list.
> Introducing new code for no good reason has no benefit, and will
> eventually cause confusion. Namely, "What is this doing here?"
Actually the question should be, who took this out, since it was in the
code base
in 1982 or earlier, and is in the commercial Macsyma as well.
RJF
>
> FWIW
>
> Robert Dodier
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima