On Thu, May 12, 2022 at 11:13:45AM +0800, Qian Yun wrote:
> Hi Nasser,
> 
> I just remembered that there is a change that may have huge effects
> on your CAS integration tests.
> 
> That is about kernel caching.
> 
> There is a change after 1.3.7 that fixes a bug, that improves accuracy
> but deceases performance.
> [commit 56a678d4c43f88bade75d0072f8f44487adb2206]

I expect this to have modest impact of test results, almost
surely less than 1 per hundred and most likely less than one
in thoushends.  One reason that this bug was unfixed
for so long is due to difficulty of repreducing it...

> Also on the same subject, this kernel caching mechanism may heavily
> affect benchmark test -- simply put, run a test that computes 5000
> integrals will take much longer time than computes each integral
> individually.

IIUC currently Nasser is running each test is separate copy
of FriCAS.  This causes longer time because each integral
pays startup cost.

> Because of kernel caching, if you compute 5000 integrals,
> in the end there might be hundreds of thousands kernels sitting in
> cache, making integration (and all other expression operation) very
> slow (because of most time spent on kernel look up, which requires
> expression comparison, which are expensive and unnecessary in this case)

IME main bottlenecks are series expansion and limits: they use
a lot of kernel lookups and create a lot of kernels.  This
affects definite integration, but impact on indefinit integration
seem to be smaller.  Also, Rubi testsuite have quite limited
coverage when viewed in terms of kernes: it repeats the same
kernels in many examples.  It is not clear to me how many
kernels would be created if one tried to run the whole testsuite
as a single run.

> So, if in your test, FriCAS needs to compute many integrals in one
> batch, I strongly advise you to clear the kernel cache after each
> integration or 10 integrations.  This may very likely gives a huge
> performance boost to the result. (The accuracy percentage may also
> improve very very slightly as well.)

It certainly would be intersting to run testsuite in this way.
In the past clearing cache exposed a bug (fixed now).  Pushing
harder may uncover more bugs.

-- 
                              Waldek Hebisch

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/20220512121713.GB22431%40fricas.math.uni.wroc.pl.

Reply via email to