calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Albert <zinki...@gmail.com>
Subject hashCode functions using multiply method
Date Fri, 29 Jan 2016 07:06:45 GMT
Hi ,
    I've noticed a lot of the places, calcite codes is using something like
this:

result = 31 * result + (body != null ? body.hashCode() : 0);

using multiply in hash code calculation probably isn't best practice.
something like shift operator should be more efficient.  since the project
is already depending on guava, why not using their hash code utils ?


thanks.



-- 
~~~~~~~~~~~~~~~
no mistakes
~~~~~~~~~~~~~~~~~~

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message