Re: Q:prg slowing down-why? - More info on VAT!


[Prev][Next][Index][Thread]

Re: Q:prg slowing down-why? - More info on VAT!



Each time a variable is called (read from or written to) on the TI-85, the
calculator has to look trhrough the VAT to get the location of the data
(The VAT is near the bottom of memory, the variables themselves are
allocated dynamically from *near* the top (Some is needed for constants and
flags).)
The VAT is unsorted, so the calc has to search through the entire VAT until
it finds the appropriate named variable, then call the address listed in the
VAT to get the actual data.  So the mode data items, the more there is to
search (especially for newly-created variables) and the more your program
slows down....
So it technically is not the amount of free memory, but the number of items
that matters.  Your programs will run faster if you have 15 pics, than if
you have 1500 reals.


For more techie-info on the specifics of the VAT and other TI-RAM allocation
issues, see http://www.ticalc.org/pub/text/ti-ram.txt




At 19:09 8/28/96 EDT, Marco Demian Radzinschi wrote:
>Please do.
>
>
>                       -Marco
>
>
>On Tue, 27 Aug 1996 17:42:09 -0400 "P. Kolbus"
><ae607@DETROIT.FREENET.ORG> writes:
>>TI-Basic programs slow down as free memory decreases, it's because of
>>the
>>way variables are allocated in the lookup table (VAT - Variable
>>Allocation
>>Table).  It's similar to the way if you have a lot of files in one
>>directory
>>on a PC, it takes longer to access them....
>>If you want more info on this, let me know and I'll post more...
>>
>
>
+--------------------------------------------------------+
| Peter Kolbus                           +1.810.474.0872 |
| ae607@detroit.freenet.org      #include <disclaimer.h> |
+--------------------------------------------------------+
| "640K should be enough for anybody"                    |
|             -Bill Gates, 1986                          |
|                                                        |
| Who is General Failure, and why is he reading drive C? |
|                                                        |
| ***Written using 100% recycled electrons***            |
+--------------------------------------------------------+


References: