Ask Your Question
0

Why is assume() so slow?

asked 2017-05-30 23:39:08 +0100

stan gravatar image

Declaring assumptions using assume() takes an awful lot of time, e.g.:

var('a b c d e f g h i')
assume([(var1, 'real') for var1 in [a, b, c, d, e, f, g, h, i]])

The same applies to declaring variables with the domain option, e.g. var('a', domain='positive'). See also https://cocalc.com/projects/34b4b62a-... for an example. Does anyone know why this takes so much time and/or how this could be made faster? Thanks a lot!

edit retag flag offensive close merge delete

Comments

This should only take long the first time, because it starts up Maxima to handle assumptions. After that it wouldn't be slow, in principle.

kcrisman gravatar imagekcrisman ( 2017-05-31 02:55:53 +0100 )edit

Thanks, but it seems to take equally long every time. Actually, if I increase the number of variables, the time needed increases more than proportionally. I updated the above worksheet to illustrate this.

stan gravatar imagestan ( 2017-06-02 13:44:20 +0100 )edit

Hmm, that is weird. I can't answer further but hopefully someone else can!

kcrisman gravatar imagekcrisman ( 2017-06-02 15:37:38 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-06-04 22:36:13 +0100

stan gravatar image

On sage-devel, it was suggested that this is due to inconsistencies in the assumptions data base and excessive calls to Maxima (https://groups.google.com/forum/#!top...). This is now Ticket https://trac.sagemath.org/ticket/2313....

edit flag offensive delete link more

Comments

Thanks, I should have realized that but hadn't looked at that code for years - good for opening the ticket!

kcrisman gravatar imagekcrisman ( 2017-06-05 20:30:47 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-05-30 23:39:08 +0100

Seen: 455 times

Last updated: Jun 04 '17