anoopj opened a new pull request, #17666:
URL: https://github.com/apache/iceberg/pull/17666

   PartitionData.hashCode allocated a Guava Hasher and two Stream pipelines 
(with per-element boxing) on every call.
   
   Replace it with partitionType.hashCode() + Arrays.hashCode(data).
   
   Behavior is unchanged; the hash value is in-memory only.
   
   A JMH benchmark of hashCode() (avgt, ns/op, JDK 17):
   
   ```
   | partition fields | before | after | speedup |
   |-----------------:|-------:|------:|--------:|
   | 1                | 49.2   | 19.3  | 2.5x    |
   | 3                | 93.5   | 64.5  | 1.5x    |
   | 6                | 160.1  | 108.7 | 1.5x    |
   ```
   
   As you can from above, the removed cost is mostly fixed per-call overhead, 
so the absolute saving (~30-50 ns) is roughly constant across partition shapes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to