[PD-dev] local symbol tables
Tim Blechmann
TimBlechmann at gmx.net
Fri Apr 29 10:31:57 CEST 2005
hi all ...
there was the discussion about local symbol tables some time ago.
local symbol tables (symbol tables for each parent canvas) would have
two advantages:
- faster access to symbol pointers (gensym)
- freeing unused symbols after closing the specific parent canvas
there would be an easy way to implement local symbol tables, when we
don't take the second point into account:
when deleting a parent canvas, we can be sure, that the $0 value of this
specific canvas will not be valid any more (so no symbols starting with
this specific $0 value will be created any more), unless:
- someone stores this $0 values somewhere in his patch
- we have an overflow of $0 values (not sure, if there is anything
concerning this implemented at the moment ...)
so i'd propose this:
- every parent canvas will have a local symbol table for symbols
starting with $0
- when deleting a parent canvas, the symbols from the local symbol table
will be moved to a data structure containing all cleaned symbols
(so we won't need to garbage collect the symbols from pd/externals)
- gensym would have to be adapted to allow three kinds of behaviours:
- normal symbol handling, using the global hash table
- active $0 handling, adding the symbol to the specific local hash
table
- obsolete $0 handling, adding symbol to the data structure
containing cleaned symbols
i consider this more elegant than the current 11bit hash table ... but
i'd like to hear some thoughs about this proposal ...
cheers .... tim
--
mailto:TimBlechmann at gmx.de ICQ: 96771783
http://www.mokabar.tk
latest mp3: kMW.mp3
http://mattin.org/mp3.html
latest cd: Goh Lee Kwang & Tim Blechmann: Drone
http://www.geocities.com/gohleekwangtimblechmannduo/
After one look at this planet any visitor from outer space
would say "I want to see the manager."
William S. Burroughs
More information about the Pd-dev
mailing list