Database madness

David Scherfgen via Maxima-discuss <[email protected]> Sun, 26 Jul 2026 23:29:54 +0200
Newsgroups gmane.comp.mathematics.maxima.general
Message-ID <CAMTHLKgaOPfOr1sDAJ83+7MDh9f7nsmcUzc-exD43enFSzX5=Q@mail.gmail.com>
--===============8912155919283083301==
Content-Type: multipart/alternative; boundary="0000000000000676e906578a4fc6"

--0000000000000676e906578a4fc6
Content-Type: text/plain; charset="UTF-8"

Hi all,

Something funny to try:

run_testsuite(tests=[rtest_limit_extra]);
for i : 1 thru 10000 do is(f(x) > i);
run_testsuite(tests=[rtest_limit_extra]);

The second test run takes about 15 times as much time as the first one.

Why? Because when asking is(f(x) > i), a database node for the number i is
created (if there's none yet) in the variable *NOBJECTS*. This slows down
subsequent sign queries, because Maxima has to search in a list that gets
longer and longer.

There's no way to recover from this, not even kill(all). These database
nodes for numbers stay forever ...

Kind regards
David Scherfgen

--0000000000000676e906578a4fc6
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto">Hi all,<div dir=3D"auto"><br></div><div dir=3D"auto">Some=
thing funny to try:</div><div dir=3D"auto"><br></div><div dir=3D"auto">run_=
testsuite(tests=3D[rtest_limit_extra]);</div><div dir=3D"auto">for i : 1 th=
ru 10000 do is(f(x) &gt; i);</div><div dir=3D"auto">run_testsuite(tests=3D[=
rtest_limit_extra]);</div><div dir=3D"auto"><br></div><div dir=3D"auto">The=
 second test run takes about 15 times as much time as the first one.</div><=
div dir=3D"auto"><br></div><div dir=3D"auto">Why? Because when asking is(f(=
x) &gt; i), a database node for the number i is created (if there&#39;s non=
e yet) in the variable *NOBJECTS*. This slows down subsequent sign queries,=
 because Maxima has to search in a list that gets longer and longer.</div><=
div dir=3D"auto"><br></div><div dir=3D"auto">There&#39;s no way to recover =
from this, not even kill(all). These database nodes for numbers stay foreve=
r ...</div><div dir=3D"auto"><br></div><div dir=3D"auto">Kind regards</div>=
<div dir=3D"auto">David Scherfgen</div></div>

--0000000000000676e906578a4fc6--


--===============8912155919283083301==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============8912155919283083301==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Maxima-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maxima-discuss

--===============8912155919283083301==--