I find the idea of pure lisp build of FriCAS very interesting and
useful.  I did some improvement of Kurt's fricas0 at
https://github.com/oldk1331/fricas0

The biggest advantage is that you can start FriCAS quickly and
do computation right away.

No need to spend 1.5 minutes (this is parallel build, single core
can take 6 minutes) to compile FriCAS from source before doing
computation.

fricas0 comes with lisp files pre-compiled from spad files.

Another improvement I did is to allow "load on demand" or
"compile on demand".

If you want to do some (simple) computation like "1+1",
there is no need to compile all lisp files to do that.
You can load the needed algebra lisp files on demand.

Of course, the load (aka interpreting) can be slow.  If your
computation is not that simple, you can compile the needed
lisp files before loading.

I find that sbcl has very slow interpreting speed for unknown reason.
ECL calls gcc to do compilation, so it is a bit slow.
I find that CLISP has good loading speed, relatively good compiling
speed, not good but good enough execution speed.

This can have great speed up for using git-bisect to find regression.

I have compiled all 131 versions from 1.3.7 to current git HEAD,
and put them into a separate git repo. It takes surprisingly small
amount of storage -- .git is only 16 MB.
git-bisect will need at most 10 runs to find the faulty commit.

So if a test takes 20 seconds (compile time and execution time) to run,
we can find the faulty commit in under 200 seconds.

For example, the pattern-match integration regression, I have the
following test script:

====test.sh
rm algebra/*fas
echo -e "f:=integrate((F^((-a*x+1)^(1/2)/(a*x+1)^(1/2)))^n/(-a^2*x^2+1),x)\nis?(operator mainKernel f,'integral)\n)quit\n" | clisp fricas.lisp | grep false
====

git bisect start; git bisect bad; git checkout HEAD~130; git bisect good
time git bisect run ./test.sh

This gives correct result (c8ef0784485f8106bccbc7c8ecb63be485ec654e)
in 145 seconds.

I have published this (sample/beta) fricas0-repo at
https://github.com/oldk1331/fricas0-repo

== Further optimizations

Current fricas0 runs in single thread. If we run a test once, we then
know which files it uses.  Then we can compile them in parallel in
advance for following bisect runs.  This should improve git-bisect speed
by a few times more on multi-core machines.

(In the above example, compile time is 12s and execution time is 8s.
So with parallel complication we can get total time from 20s to 10s.)

I think the format of *.daase and *.text can be improved.  Some of the
KAF optimization doesn't make sense anymore. Small changes in code
should not cause huge changes in them.

- Qian

--
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/508a9781-e73d-f217-bfc0-363ad65f5f52%40gmail.com.

Reply via email to