From: Ken A. <kan...@bb...> - 2004-07-09 18:55:21
|
Tim, Let me know what you think of this proposal. Currently a DynamicVariable has 3 fields Symbol name DynamicEnvironment dynamicenv - used to look up value in hash table. Object storedDynamicValue - only used during serialization. A DynamicEnvironment, DE, maps symbols to values. So every time we evaluate a DV, we do a hash lookup. I'd like to propose we 1. put the DV's value in the storedDynamicValue field 2. remove the dynamicenv field. 3. Change DE to map from Symbol -> DV. This means the DE will intern the DV for a symbol, but it can use its current hashtable to do that. getBindings and importBindings would have to clone all the DV's (or could they be shared?). The advantage is we'd get rid of a runtime hash lookup for every global value. How does that sound? k |