Re: Database madness

Raymond Toy <[email protected]> Sun, 26 Jul 2026 15:00:35 -0700
Newsgroups gmane.comp.mathematics.maxima.general
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--===============5020024234085272913==
Content-Type: multipart/alternative;
 boundary="------------R7UTgamQMFEB0yFhafmtmc4r"
Content-Language: en-US

This is a multi-part message in MIME format.
--------------R7UTgamQMFEB0yFhafmtmc4r
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

On 7/26/26 2:29 PM, David Scherfgen via Maxima-discuss wrote:

> 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.
Kinda funny, but certainly a rather pathological case. This doesn’t seem 
like something anyone would do on purpose. (Maybe I lack imagination.)

Could it be replaced by a hash table? I suppose that might break lots of 
code?

&#8203;
--------------R7UTgamQMFEB0yFhafmtmc4r
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE html>
<html>
  <head>

    <meta http-equiv=3D"content-type" content=3D"text/html; charset=3DUTF=
-8">
    <title></title>
    <meta charset=3D"utf-8">
  </head>
  <body>
    <div class=3D"markdown-here-wrapper">
      <p style=3D"margin-bottom: 19.2px; margin-top: 0px;">On 7/26/26 2:2=
9
        PM, David Scherfgen via Maxima-discuss wrote:<br>
      </p>
      <blockquote type=3D"cite"
style=3D"border-block-color: rgb(119, 119, 119); border-bottom-color: rgb=
(119, 119, 119); border-inline-color: rgb(114, 159, 207) rgb(119, 119, 11=
9); border-inline-start: 2px solid rgb(114, 159, 207); border-left: 2px s=
olid rgb(114, 159, 207); border-right-color: rgb(119, 119, 119); border-t=
op-color: rgb(119, 119, 119); color: rgb(119, 119, 119); column-rule-colo=
r: rgb(119, 119, 119); margin: 19.2px 0px; outline-color: rgb(119, 119, 1=
19); padding-inline: 16px; padding-left: 16px; padding-right: 16px; quote=
s: none; text-decoration-color: rgb(119, 119, 119); text-emphasis-color: =
rgb(119, 119, 119);">
        <div dir=3D"auto">Hi all,
          <div dir=3D"auto"><br>
          </div>
          <div dir=3D"auto">Something 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 thru 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'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.</div>
        </div>
      </blockquote>
      Kinda funny, but certainly a rather pathological case. This
      doesn=E2=80=99t seem like something anyone would do on purpose. (Ma=
ybe I
      lack imagination.)
      <p style=3D"margin-bottom: 19.2px; margin-top: 0px;">Could it be
        replaced by a hash table? I suppose that might break lots of
        code?</p>
    </div>
    <div class=3D"mdhr-raw"
style=3D"height:0;width:0;max-height:0;max-width:0;overflow:hidden;font-s=
ize:0;padding:0;margin:0;"
      aria-hidden=3D"true"
title=3D"MDH:PGJyPjxicj48ZGl2IGNsYXNzPSJtb3otY2l0ZS1wcmVmaXgiPk9uIDcvMjYv=
MjYgMjoyOSBQTSwgRGF2aWQgU2NoZXJmZ2VuIHZpYSBNYXhpbWEtZGlzY3VzcyB3cm90ZTo8Y=
nI+PC9kaXY+PGJsb2NrcXVvdGUgdHlwZT0iY2l0ZSIgY2l0ZT0ibWlkOkNBTVRITEtnYU9QZk=
9yMXNEQUo4Mys3TURoO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gdG8gc2VhcmNoIGluIGEgbGlzdCB0aGF0IGdldHMgbG9uZ2VyIGFuZCBsb25nZ=
XIuPC9kaXY+PC9kaXY+PC9ibG9ja3F1b3RlPktpbmRhIGZ1bm55LCBidXQgY2VydGFpbmx5IG=
EgcmF0aGVyIHBhdGhvbG9naWNhbCBjYXNlLiZuYnNwOyBUaGlzIGRvZXNuJ3Qgc2VlbSBsaWt=
lIHNvbWV0aGluZyBhbnlvbmUgd291bGQgZG8gb24gcHVycG9zZS4mbmJzcDsgKE1heWJlIEkg=
bGFjayBpbWFnaW5hdGlvbi4pPGJyPjxicj5Db3VsZCBpdCBiZSByZXBsYWNlZCBieSBhIGhhc=
2ggdGFibGU/Jm5ic3A7IEkgc3VwcG9zZSB0aGF0IG1pZ2h0IGJyZWFrIGxvdHMgb2YgY29kZT=
88YnI+PGJyPjx1bCBjbGFzcz0iZHJvcGRvd24tbWVudSB0ZXh0Y29tcGxldGUtZHJvcGRvd24=
iIHN0eWxlPSJkaXNwbGF5OiBub25lOyBwb3NpdGlvbjogYWJzb2x1dGU7IHotaW5kZXg6IDEw=
MDA7IiBjb250ZW50ZWRpdGFibGU9ImZhbHNlIiBwb3BvdmVyPSJhdXRvIj48L3VsPg=3D=3D"=
>&amp;#8203;</div>
  </body>
</html>

--------------R7UTgamQMFEB0yFhafmtmc4r--


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


--===============5020024234085272913==
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

--===============5020024234085272913==--