On 17 May 2009, at 01:34, nescivi wrote:
Equivalent Symbols and numbers for instance test true for identity. Strings only if it's the exact same object.
a = IdentityDictionary[\foo->\bar] IdentityDictionary[ (foo -> bar) ] b = Dictionary[\foo->\bar] Dictionary[ (foo -> bar) ] { 1000.do { a[\foo] } }.bench time to run: 0.0003569420077838 seconds. { 1000.do { b[\foo] } }.bench time to run: 0.002664454994374 seconds. Your example will work if you simply reverse the argument order and use Symbols instead of Strings. Sorry, coming late on this thread, but is that not what you want? Or you do want the Points as keys? The other alternative is to convert to a Dictionary if needed using as. S.
|