If you type 1+1 into maxima again and again, you will see (%i1) 1+1 (%o1) 2 (%i2 1+1 (%o2) 2 ....... (%i32000) 1+1 (%o32000) 2 .... At some point in the interaction consisting of about 80 pages, it might occur to you that some of those answers were taking up memory :)
as for searching in that list for labels already in use -- I'm not sure why that is done. What the "makelabel" program does, if a label is already in use, is to delete it from that list and reinsert it at the front of the list. So storing the list of labels in a hashtable would be a no-op, since re-inserting a label would put it in the same place. And the only way a label would be re-used is if someone deliberated changed the global variable that is auto-incremented whenever a label is generated. Somehow someone thinks that having a sorted list of the labels in order is important. The only use I see that the system makes of this list is if you ask it to make a dump to a file of all the labels and their values. It writes them out in order. Also, I just timed a program to check if a number is a member of a list of length 32,000. The time reported varies, between 0.0000 and 0.01 seconds. Even if makelabel runs through this search 4 times or so [bad programming unless you assume it is of trivial length] it does not seem to me that this would matter entirely so much. But then I'm sure that Maxima does not have enough cupholders... RJF On Aug 27, 1:03 pm, William Stein <wst...@gmail.com> wrote: > On Thu, Aug 27, 2009 at 9:28 AM, rjf<fate...@gmail.com> wrote: > > > It's nice that the "labels" issue has been resolved. It is fairly > > implausible that a user would > > type in 32,000 individual commands, so optimizing a search was an > > obvious issue. > > Of course lisp has hash tables. Also arrays. > > The idea that you were generating tens of thousands of symbols -- in > > addition to keeping a list of them -- > > suggests a misunderstanding of some sort. It is kind of like opening > > up a cafeteria in a minivan and > > complaining to Ford that their design is bad because it has only 14 > > cupholders, and you need at least 200. > > Many thanks for all your helpful comments! > > Regarding this, I think that was Maxima's design that did that. If > you just sit down at the maxima console and type > > 1+1; > > a few thousand times (but nothing else), then it will start getting > slower and slower, because it is searching through its own list of > prompts. > > -- William --~--~---------~--~----~------------~-------~--~----~ To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---