Smalltalk/X WebserverDocumentation of class 'SmallIdentityDictionary': | |
Class: SmallIdentityDictionaryInheritance:Object | +--Collection | +--KeyedCollection | +--SmallDictionary | +--SmallIdentityDictionary
Description:documentation to be added. class: <a short class summary here, describing what instances represent> responsibilities: <describing what my main role is> collaborators: <describing with whom and how I talk to> API: <public api and main messages> example: <a one-line examples on how to use - can also be in a separate example method> implementation: <implementation points> [instance variables:] [class variables:] Related information:Instance protocol:comparing
Examples:Creation timing: {SmallIdentityDictionary. IdentityDictionary. OrderedDictionary} do:[:eachClass| |keys values dict time| keys := #(aaaaa bbbb cccc dddd ffff gggg hhhh jjjj kkkk llll). values := #(1 2 3 4 5 6 7 8 9 10). time := TimeDuration toRun:[ 1000000 timesRepeat:[ dict := eachClass withKeys:keys andValues:values. ] ]. Transcript showCR:(eachClass name, ' time: ', time printString). ] Access timing: {SmallIdentityDictionary. IdentityDictionary. OrderedDictionary} do:[:eachClass| |keys values dict time| keys := #(aaaaa bbbb cccc dddd ffff gggg hhhh jjjj kkkk llll). values := #(1 2 3 4 5 6 7 8 9 10). dict := eachClass withKeys:keys andValues:values. time := TimeDuration toRun:[ 1000000 timesRepeat:[ 1 to:keys size do:[:idx| dict at:(keys at:idx) ] ] ]. Transcript showCR:(eachClass name, ' time: ', time printString). ] |
|
ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sat, 21 Dec 2024 17:17:16 GMT |