title: Scala murmur hash vs Java native hash
body: <p>I am learning scala and kind of confused on the hash code part of case classes.</p>
  
  <p>As far as I have seen case classes provide an automatic generation of toString,equals and hashCode.</p>
  
  <p>In java the traditional wisdom is that java hashcode uses a native implementation.</p>
  
  <p>But in scala it uses <a href="https://github.com/scala/scala/blob/2.12.x/src/library/scala/runtime/ScalaRunTime.scala#L145" rel="nofollow noreferrer">murmur hash</a></p>
  
  <p>My questions.</p>
  
  <p>1) Java has native hashcode since the hashcode is machine dependant,but if scala uses murmur hash then how it is machine independent? </p>
  
  <p>2) Scala has regular classes as well as case classes, do normal classes also use murmur hash?</p>
  
  <p>3) If murmur hash is really the fastest implementation after point 1 then why does java still using a native implementation?</p>