one place where "sb-gmp" gives significant speedup

9 views
Skip to first unread message

Qian Yun

unread,
Sep 17, 2024, 8:28:53 AM9/17/24
to fricas-devel
I'm talking about the official sb-gmp package:

https://github.com/sbcl/sbcl/tree/master/contrib/sb-gmp

You can enable it in fricas by:

)lisp (require :sb-gmp)
)lisp (SB-GMP:INSTALL-GMP-FUNS)

The test case I am profiling is:

)lisp (sb-sprof:start-profiling)
integrate(D((1+x^(2/3))^(1/3),x),x)
)lisp (progn (sb-sprof:stop-profiling) (sb-sprof:report))


By default, it takes 1326s, with sb-gmp, it takes 242s.

It seems that most time is spent in bignum gcd.

I'll take a deeper look to see if there are optimization
opportunities related with polynomials.

- Qian

Qian Yun

unread,
Sep 18, 2024, 10:10:43 PM9/18/24
to fricas-devel
Okay... I was not initializing fricas's gmp support correctly.
(It's a bug in gentoo ebuild, and I've reported it upstream.)

So our in-house gmp_wrap takes 242s as well.
So it's all good after all.

(Side note: shall we put the result of gmp initialization
into fricas startup banner?)

- Qian
Reply all
Reply to author
Forward
0 new messages