[PD] symbol anxiety
Mathieu Bouchard
matju at artengine.ca
Mon Feb 23 02:11:12 CET 2009
On Sun, 22 Feb 2009, Phil Stone wrote:
> A) Is it true that [maketime] would continually grow the symbol table?
yes.
> B) Is it possible to tell how full the symbol table is? How much memory
> is allocated to it in the first place?
It never gets full. It just becomes bigger and bigger, as long as you have
enough RAM. As it gets bigger, symbol-lookup becomes slower, and
symbol-generation too as it always involves one symbol-lookup. The lookup
time is always O(n). However, in normal circumstances, it's close to
n/16384, an extremely small multiple of n, whereas if you're extremely
unlucky, it could be just n steps. The symbols are spread out in a large
table in a random-looking manner that is not really random. Each slot in
the table has a list of symbols which starts being empty and then grows as
needed.
If the symbols were organised as a tree, it wouldn't be a theoretical
speed problem, but it would still end up eating up RAM.
The table starts at 64k, or 128k in 64-bit mode, and each symbol takes an
additional amount of RAM, but it depends on which malloc you use and such.
> C) Wouldn't it be nice to have some truly transient symbols, that could
> be abstraction-local, or at least, re-usable?
yes, but it's nowhere near happening.
_ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801, Montréal, Québec
More information about the Pd-list
mailing list