Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
maropu committed Jun 22, 2016
1 parent 30d28bc commit e8eaf70
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,10 @@ public UnsafeMapData getMap(int ordinal) {
return map;
}

// This `hashCode` computation could consume much processor time for large data.
// If the computation becomes a bottleneck, we can use a light-weight logic; the first fixed bytes
// are used to compute `hashCode` (See `Vector.hashCode`).
// The same issue exists in `UnsafeMapData.hashCode`.
@Override
public int hashCode() {
return Murmur3_x86_32.hashUnsafeBytes(baseObject, baseOffset, sizeInBytes, 42);
Expand Down

0 comments on commit e8eaf70

Please sign in to comment.