Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #28240

Re: Benchmarking hashcode algorithms

Date 2014-04-26 18:54 +0200
From Marcel Müller <news.5.maazl@spamgourmet.org>
Newsgroups comp.lang.java.programmer
Subject Re: Benchmarking hashcode algorithms
References <klnnl9ls2ovfnt6slsp4hsh6tcig3j5ka9@4ax.com>
Message-ID <535be4cd$0$6707$9b4e6d93@newsspool2.arcor-online.net> (permalink)
Organization Arcor

Show all headers | View raw


On 26.04.14 18.49, Roedy Green wrote:
> I have been benchmarking some hashing algorithms. The fastest and
> fewest collisions are near the top.  I used real world data.
>
> The big surprise for me is how good String.hashCode is.
>
> Collecting 20000 filenames from drive E...
> The best have the lowest elapsed times and the fewest collisions.

Speed: no surprise. I could bet that most VMs implement String.hashCode 
as native code.

> Benchmarking SunCRC16...
> Computing 100000 SunCRC16 hashes...
> Time to compute 100000 iterations of SunCRC16 was 215.462 seconds.
> Checking 20000 SunCRC16 for collisions...
> There were 2768 collisions.

Also no surprise with 16 bits.


Marcel

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Benchmarking hashcode algorithms Roedy Green <see_website@mindprod.com.invalid> - 2014-04-26 09:49 -0700
  Re: Benchmarking hashcode algorithms Marcel Müller <news.5.maazl@spamgourmet.org> - 2014-04-26 18:54 +0200
  Re: Benchmarking hashcode algorithms Roedy Green <see_website@mindprod.com.invalid> - 2014-04-26 12:24 -0700
    Re: Benchmarking hashcode algorithms Mike Amling <mamling@chaff.us> - 2014-05-05 11:17 -0500
      Re: Benchmarking hashcode algorithms Roedy Green <see_website@mindprod.com.invalid> - 2014-05-16 16:27 -0700
        Re: Benchmarking hashcode algorithms Silvio <silvio@internet.com> - 2014-05-20 17:32 +0200
      Re: Benchmarking hashcode algorithms Roedy Green <see_website@mindprod.com.invalid> - 2014-05-16 16:28 -0700

csiph-web