Jump to content
  • Advertisement
Sign in to follow this  
aqrit

Brute Force Perfect Hash with GPU?

This topic is 2167 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Any brute force Multiply-Add-Shift lib to calculate a perfect hash for ~50 unqiue integers?

 

I can Multiply-Shift on the CPU but throwing the other unknown in just slows it down too much.

gperf works well but I'd like something with fewer lookup tables.

 

I'm grabbing the Cuda SDK/Thrust tonite.

( sorry if this is in the wrong section )

Edited by aqrit

Share this post


Link to post
Share on other sites
Advertisement

Wouldn't that just be a count of unique integers? So sort the numbers, and remove duplicates. The hash function is to find the element in the array, and get it's index.

Share this post


Link to post
Share on other sites

Wouldn't that just be a count of unique integers? So sort the numbers, and remove duplicates. The hash function is to find the element in the array, and get it's index.

That would get the job done, but being O(n) would of course defeat the purpose of it being a hash.

 

I'm still wondering if this is just a self-educational thing, or whether the poster believes that a minimal perfect hash is necessary when it almost certainly isn't.

Share this post


Link to post
Share on other sites

Wouldn't that just be a count of unique integers? So sort the numbers, and remove duplicates. The hash function is to find the element in the array, and get it's index.

That would get the job done, but being O(n) would of course defeat the purpose of it being a hash.

 

I'm still wondering if this is just a self-educational thing, or whether the poster believes that a minimal perfect hash is necessary when it almost certainly isn't.

It's O(log(N)). Although with 50 integers it hardly matters.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!