Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hash containers with floating point keys should use fixed-point backing store representation [HPPC-124] #167

Open
dweiss opened this issue Mar 13, 2015 · 1 comment

Comments

@dweiss
Copy link
Member

dweiss commented Mar 13, 2015

      while (!(Double.doubleToLongBits(existing = keys[slot]) == 0)) {
        if ((Double.doubleToLongBits(key) == Double.doubleToLongBits(existing))) {
          return true;
        }
        slot = (slot + 1) & mask;
      }

these should be peeled nicely by the JVM, but it'd be nice not to generate them.


Issue: HPPC-124 (migrated from JIRA), created by Dawid Weiss (@dweiss), updated May 21 2018

@dweiss
Copy link
Member Author

dweiss commented Mar 13, 2015

Comment by Dawid Weiss (@dweiss) (migrated from JIRA)

This would allow one-time key normalization from floating point to a fixed representation, then everything would just work on ints or longs (including hashes). longBitsToDouble should be much faster for scanning through the array than the normalizing conversion the other way around.

@dweiss dweiss self-assigned this Nov 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant