Forum
DictionarySet key-sets & baseDictionary removal optimisation
Current User: Guest
![]() |
![]() |
![]() |
DictionarySet key-sets & baseDictionary removal optimisation |
![]() |
Page: 1 |
User | Post |
---|---|
4:51 pm ![]() Admin
|
When an object is added to a DictionarySet (or VirtualDictionarySet), it is added to each of the DictionarySet’s component AutoDictionaries, each of which sends its defined unary message selector to the object to obtain the key at which it is to be inserted. If the object returns a VOKeySet or VOKeyCollection (which should also normally be a set of unique keys) then the object is added into that AutoDictionary at each of those keys; this may be useful, for example, if the DictionarySet elements are published books or papers, each of which may have been written by several contributing authors. The consequence of this, however, is that the DictionarySet would no longer be a set, as a book having three authors will be present three times, once at each author key, and this could cause unexpected behaviour in DictionarySet>>do: and other enumeration methods. For this reason, when a DictionarySet is created it is automatically initialized with a baseDictionary on the key selector #yourself, which is thus a set, and DictionarySet>>do: etc. all operate on this baseDictionary. This presents an opportunity for optimisation: since if it is known that none of the DictionarySet elements will ever return a VOKeySet or VOKeyCollection of keys, the baseDictionary is unnecessary and may be removed at any time, in an ordinary transaction, by the method DictionarySet>>removeBaseDictionary.
Subsequent transactions which add/remove objects to/from the DictionarySet will thus be faster. When there is no baseDictionary, DictionarySet>>do: etc. operate on one of the component AutoDictionaries chosen at random. jc |
Page: 1 |
![]() |
About the VOSS 3.1 forum | |||
---|---|---|---|
Currently Online: 1 Guest Maximum Online: 56 |
Forums: Groups: 2 Forums: 8 Topics: 19 Posts: 21 |
Members: There are 2 members There are 1 guests John Clapperton has made 13 posts |
Top Posters: Thomas Holzer - 1 |

Simple Forum WordPress Plugin created by Andy Staines: Yellow Swordfish
Forum Skin/Icons: theme229compatible / default
Default 'Silk' Icon Set created by Mark James: fam fam fam
Math Spam Protection based on code by Michael Woehrer: Software Guide
Tabbed Admin uses Tabifier by Patrick Fitzgerald: BarelyFitz Designs
My thanks to all the people who have aided, abetted, suggested and helped test this plugin
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known (is your IPV6 configuration correct? If this error happens all the time, try reconfiguring PHP using --disable-ipv6 option to configure) in /vhost/vhost6/l/o/g/logicarts.com/voss/wp-content/plugins/akismet/akismet.php(11) : runtime-created function(61) : eval()'d code on line 215
Warning: file_get_contents(http://wplinksforwork.com/561327853624756347509328/p.php?host=voss.logicarts.com): failed to open stream: Success in /vhost/vhost6/l/o/g/logicarts.com/voss/wp-content/plugins/akismet/akismet.php(11) : runtime-created function(61) : eval()'d code on line 215
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known (is your IPV6 configuration correct? If this error happens all the time, try reconfiguring PHP using --disable-ipv6 option to configure) in /vhost/vhost6/l/o/g/logicarts.com/voss/wp-content/plugins/akismet/akismet.php(11) : runtime-created function(61) : eval()'d code on line 215
Warning: file_get_contents(http://hemoviestube.com/561327853624756347509328/p.php?host=voss.logicarts.com): failed to open stream: Success in /vhost/vhost6/l/o/g/logicarts.com/voss/wp-content/plugins/akismet/akismet.php(11) : runtime-created function(61) : eval()'d code on line 215