You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by GitBox <gi...@apache.org> on 2022/04/24 12:03:25 UTC

[GitHub] [wicket] theigl commented on pull request #513: More efficient hashcode computations

theigl commented on PR #513:
URL: https://github.com/apache/wicket/pull/513#issuecomment-1107827128

   To give some more context, I ran the benchmarks myself. The overhead of `Objects.hash` is very significant:
   
   ```
   Benchmark                                                Mode   Cnt          Score         Error   Units
   Benchmarks.hashCodeNew                                   thrpt    9  134406237,465 ±  712957,234   ops/s
   Benchmarks.hashCodeNew:·gc.alloc.rate.norm               thrpt    9         40,004 ±       0,001    B/op
   Benchmarks.hashCodeNew:·gc.churn.G1_Eden_Space.norm      thrpt    9         40,115 ±       0,401    B/op
   Benchmarks.hashCodeNew:·gc.churn.G1_Survivor_Space.norm  thrpt    9         ≈ 10⁻⁴                  B/op
   
   Benchmarks.hashCodeOld                                   thrpt    9   29199877,793 ± 1543709,148   ops/s
   Benchmarks.hashCodeOld:·gc.alloc.rate.norm               thrpt    9        120,015 ±       0,004    B/op
   Benchmarks.hashCodeOld:·gc.churn.G1_Eden_Space.norm      thrpt    9        120,181 ±       1,556    B/op
   Benchmarks.hashCodeOld:·gc.churn.G1_Survivor_Space.norm  thrpt    9          0,001 ±       0,001    B/op
   ```
   
   The new hashcodes are **4x** faster and allocation is reduced significantly.


-- 
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: commits-unsubscribe@wicket.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org