Menu

#1 Better hashcode

open
nobody
None
5
2003-10-29
2003-10-29
No

The current "algorithm" for calculating hashcodes is
pretty lame.
This patch provides an "algorithm" that gives a
hashcode that has a much better distribution.

Discussion

  • Kasper Nielsen

    Kasper Nielsen - 2003-10-29

    Hashcode patch

     
  • Miguel Griffa

    Miguel Griffa - 2003-10-30

    Logged In: YES
    user_id=115982

    Hey, thank you!
    I'm about to merge the patch now, and probably tomorow I'll
    upload the new version.

     
  • Kasper Nielsen

    Kasper Nielsen - 2003-10-30

    Logged In: YES
    user_id=517205

    Here is a new version that also handles super classes.
    I've also made all of them check for null no matter what,
    much safer this. So I think the two last wizard pages can be
    dropped.

    I've also patched equals to produce some code that is a little
    prettyier to look at. And super classes is handled as well now

    The equals handing of [][] (or bigger) arrays is still ugly
    though.

     
  • Kasper Nielsen

    Kasper Nielsen - 2003-10-30

    woops forgot the new patch

     
  • Miguel Griffa

    Miguel Griffa - 2003-10-31

    Logged In: YES
    user_id=115982

    Thank you!
    I'm applying the patch now and will release new version ASAP.

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.