Re: Low order hashes

2019-01-02 Thread Steven Schveighoffer via Digitalmars-d-learn
On 1/1/19 2:40 PM, Michelle Long wrote: I need to hash a few strings to a byte, short, or int. hashOf works for int only on x86. What would be a nice way to accomplish this? Collisions are not good but not catastrophic. Mainly I need a unique ID to emulate enums. I might just chop off the ext

Low order hashes

2019-01-01 Thread Michelle Long via Digitalmars-d-learn
I need to hash a few strings to a byte, short, or int. hashOf works for int only on x86. What would be a nice way to accomplish this? Collisions are not good but not catastrophic. Mainly I need a unique ID to emulate enums. I might just chop off the extra bits or mash them up somehow and it w