Posts Tagged hash

NativeHashSet<T>

Tags: , , ,

Unity’s Native Collections package, currently in Preview, provides a hash map but not a hash set. Today we’ll supplement NativeHashMap<TKey, TValue> with our own NativeHashSet<T> as part of the NativeCollections repo. Read on for performance results and to see how to use it!

Read the rest of this article »

3 Comments

Hash Algorithm Performance

Tags: ,

Sooner or later you’ll need to use a cryptographic hash function. Sometimes it’s to quickly check if two large byte arrays are the same, sometimes it’s for interoperability with some server, and other times it’s to obfuscate a string. In any case, performance of the various hash algorithms varies wildly. Today’s article performance tests all 27 hash algorithm permutations to see which is fastest and which is slowest. Read on for the performance test results!

Read the rest of this article »

7 Comments

Fast AS3 MultiMap

Tags: , , , ,

Sometimes you need to map a key to many values, but AS3 has no built-in data structure for this purpose. Dictionary and Object are suitable one-to-one maps, but there’s been no one-to-many support until now. Read on for my own one-to-many class—MultiMap—as well as performance testing and analysis.

Read the rest of this article »

39 Comments