cause of faster Fricas 1.3.7 compared to 1.3.6 using integrate command.

18 views
Skip to first unread message

Nasser M. Abbasi

unread,
Jul 8, 2021, 1:06:04 AM7/8/21
to FriCAS - computer algebra system
I noticed that Fricas 1.3.7 intergate (called via sagemath 9.3), is more than twice as fast in the independent CAS integration test than integrate in 1.3.6 (via sagemath 9.0), all on the same PC. Using Linux on a VBox with same memory.

I do not know if this speed up came from improvement in the sagemath to Fricas interface, or improvement in Fricas 1.3.7 integration code itself or some other parts of Fricas.

Any one noticed this also and could may shed some light on this?  And why is it much faster now? I was just wondering what the cause could be. (It is ofcourse, very good that integrate command is much faster now).

I am sure it will be even faster, if I run Fricas directly on Linux, without using sagemath interface, but I do not know how to do this, and it is easier to run it via sagemath so far.

This is the current version information for Fricas I am using 

>fricas
Checking for foreign routines
FRICAS="/usr/local/lib/fricas/target/x86_64-linux-gnu"
spad-lib="/usr/local/lib/fricas/target/x86_64-linux-gnu/lib/libspad.so"
foreign routines found
openServer result 0
FriCAS Computer Algebra System
Version: FriCAS 1.3.7

with 1.3.6, average time to do an integral was 2.84 seconds. With 1.3.7 it is now 1.38 seconds.

Dima Pasechnik

unread,
Jul 8, 2021, 8:10:06 AM7/8/21
to fricas...@googlegroups.com
On Thu, Jul 8, 2021 at 6:06 AM 'Nasser M. Abbasi' via FriCAS -
computer algebra system <fricas...@googlegroups.com> wrote:
>
> I noticed that Fricas 1.3.7 intergate (called via sagemath 9.3), is more than twice as fast in the independent CAS integration test than integrate in 1.3.6 (via sagemath 9.0), all on the same PC. Using Linux on a VBox with same memory.
>
> I do not know if this speed up came from improvement in the sagemath to Fricas interface, or improvement in Fricas 1.3.7 integration code itself or some other parts of Fricas.

On top of possible Fricas code improvements,
since Sage 9.0, ECL, the Lisp compiler used to build Fricas got
updated. This might be a reason,
as well as options used to build the software (e.g. in Sage 9.3 more
capabilities of your CPU might be used).


>
> Any one noticed this also and could may shed some light on this? And why is it much faster now? I was just wondering what the cause could be. (It is ofcourse, very good that integrate command is much faster now).
>
> I am sure it will be even faster, if I run Fricas directly on Linux, without using sagemath interface, but I do not know how to do this, and it is easier to run it via sagemath so far.

You can start Sage shell in terminal by running

sage -sh

and then you can start Fricas:

$ ./sage -sh

Starting subshell with Sage environment variables set. Don't forget
to exit when you are done. Beware:
* Do not do anything with other copies of Sage on your system.
* Do not use this for installing Sage packages using "sage -i" or for
running "make" at Sage's root directory. These should be done
outside the Sage shell.

Bypassing shell configuration files...

Note: SAGE_ROOT=/mnt/opt/Sage/sage-dev
(sage-sh) dima@hilbert:sage-dev$ fri
fribidi fricas
(sage-sh) dima@hilbert:sage-dev$ fricas
;;; Loading #P"/usr/lib64/ecl-21.2.1/cmp.fas"
Starting interpsys
spad = "/mnt/opt/Sage/sage-dev/local/lib/fricas/target/x86_64-pc-linux-gnu"
Re-reading compress.daase Re-reading interp.daase
FriCAS initialization: interpreter
FriCAS initialization: database
FriCAS initialization: constructors
FriCAS initialization: history
FriCAS Computer Algebra System
Version: FriCAS 1.3.7
Timestamp: Wed Jul 7 09:55:44 BST 2021
-----------------------------------------------------------------------------
Issue )copyright to view copyright notices.
Issue )summary for a summary of useful system commands.
Issue )quit to leave FriCAS and return to shell.
-----------------------------------------------------------------------------

Re-reading compress.daase Re-reading interp.daase
Re-reading operation.daase
Re-reading browse.daase
Re-reading category.daase
Initial getdatabase
preloading /mnt/opt/Sage/sage-dev/local/lib/fricas/target/x86_64-pc-linux-gnu/algebra/FR.fas..loaded.
...
...
preloading /mnt/opt/Sage/sage-dev/local/lib/fricas/target/x86_64-pc-linux-gnu/algebra/OUTFORM.fas..loaded.

before fricas-restart
openServer result 0
FriCAS Computer Algebra System
Version: FriCAS 1.3.7
Timestamp: Wed Jul 7 09:55:44 BST 2021
-----------------------------------------------------------------------------
Issue )copyright to view copyright notices.
Issue )summary for a summary of useful system commands.
Issue )quit to leave FriCAS and return to shell.
-----------------------------------------------------------------------------


(1) ->

>
> This is the current version information for Fricas I am using
>
> >fricas
> Checking for foreign routines
> FRICAS="/usr/local/lib/fricas/target/x86_64-linux-gnu"
> spad-lib="/usr/local/lib/fricas/target/x86_64-linux-gnu/lib/libspad.so"
> foreign routines found
> openServer result 0
> FriCAS Computer Algebra System
> Version: FriCAS 1.3.7
>
> with 1.3.6, average time to do an integral was 2.84 seconds. With 1.3.7 it is now 1.38 seconds.
>
> --
> 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 fricas-devel...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/fricas-devel/96af17be-3162-4568-b805-2d241b6dd75cn%40googlegroups.com.

Waldek Hebisch

unread,
Jul 8, 2021, 12:28:24 PM7/8/21
to 'Nasser M. Abbasi' via FriCAS - computer algebra system
On Wed, Jul 07, 2021 at 10:06:03PM -0700, 'Nasser M. Abbasi' via FriCAS - computer algebra system wrote:
> I noticed that Fricas 1.3.7 intergate (called via sagemath 9.3), is more
> than twice as fast in the independent CAS integration test than integrate
> in 1.3.6 (via sagemath 9.0), all on the same PC. Using Linux on a VBox with
> same memory.

Glad to know this.

> I do not know if this speed up came from improvement in the sagemath to
> Fricas interface, or improvement in Fricas 1.3.7 integration code itself or
> some other parts of Fricas.
>
> Any one noticed this also and could may shed some light on this? And why
> is it much faster now? I was just wondering what the cause could be. (It is
> ofcourse, very good that integrate command is much faster now).

Well, _you_ have the data. There are a few bug fixes that could speed
up _some_ long-running integrals quite a lot. I do not know how many
such integrals are in Rubi testsuite. If improvement come from small
number of long running integrals, then it is probably due to FriCAS
fixes. OTOH if it is spread out to all testsuite, then probably is
due to factors outside FriCAS: Lisp compiler, Sage interface, etc.

--
Waldek Hebisch

Waldek Hebisch

unread,
Aug 21, 2021, 11:02:58 AM8/21/21
to 'Nasser M. Abbasi' via FriCAS - computer algebra system
I see that in sci.math.symbolic you reported signifcantly smaller
size of FriCAS output. This indicates that bug fixes affect
significant number of integrals in Rubi testsuite, so probably
also are responsible for speed up.

--
Waldek Hebisch
Reply all
Reply to author
Forward
0 new messages