Einhugur ObjectDictionary vs Xojo Dictionary?

Has anyone benchmarked the two?

Years ago, yes. Search the NUG mailing list as I don’t recall the results, but those results are probably stale now.

Found it

Good find. I forgot that the test project was still on my site so I’ve updated it for Xojo and removed the references to the now-defunct ElfData.

http://www.mactechnologies.com/public_files/Dict_Test/dict_test.zip

The results are very close for the two.

Our case back then was to make the dictionary for faster access from within plugins since accessing the Xojo ones from there is not so practical, and also have the slightly different functionality/feature set that we needed to build some components (such as for the TreeView for example).

Its still nice to see it can keep up also speed wise.

Is the Einhugur Dictionary case sensitive ?

Yes, case and encoding sensitive.

encoding even?
My dictionary in plugin converts to UTF-8 for comparison.

And today I made the case sensitivity a parameter.

It is fully sensitive by design, its what we needed internally in some of our controls. There is little sense in just replicating the Xojo dictionary with just same functinality.

Creating a subclass of the Xojo Dictionary that supports case sensitive keys is not very difficult.

Using the one I incorporated into MacOSLib is even easier. :slight_smile:

Not from a plugin like Bjorn writes :slight_smile:

I’d love to see the dictionary take “comparator methods” so I could make it whatever way I wanted
By using a comparator that was case sensitive I have a case sensitive dictionary
If I write one that is not then it’s not
If I want case & encoding I could write such a comparator

The map itself doesn’t change it’s function - just how it compares keys

Are you talking about CFDictionary ?

[quote=178672:@Norman Palardy]Not from a plugin like Bjorn writes :slight_smile:
[/quote]

I would not dare calling easy the concoction of plugins.

No, the DictionaryCaseSensitive included with MacOSLib.

For a dictionary you would usually need Hash function and a comparator method.

MacOSLib is so cluttered, how do I ever find it there ?

It is literally called DictionaryCaseSensitive, so just do cmd-shift-L and start typing that. It’s in Misc./NativeSubclasses I have an older version on my web site too:

http://www.mactechnologies.com/public_files/Case_Sensitive_Dictionary/Case_Sensitive_Dictionary.zip

[quote=178746:@Kem Tekinay]It is literally called DictionaryCaseSensitive, so just do cmd-shift-L and start typing that. It’s in Misc./NativeSubclasses I have an older version on my web site too:

http://www.mactechnologies.com/public_files/Case_Sensitive_Dictionary/Case_Sensitive_Dictionary.zip[/quote]

Thank you Kem :slight_smile: