merlimat opened a new pull request, #3807:
URL: https://github.com/apache/bookkeeper/pull/3807

   ### Motivation
   
   (This is stacked on top of #3800 & #3806 -- I'll rebase once these are 
merged)
   
   Few improvements in the `ArrayGroupSort`:
    1. Use insertion sort once the quick-sort partitions are small enough
    2. Use static methods and fix group/key size (since we only care for key=2 
and group=4)
    3. Unroll the loop for comparison and swap of elements
   
   Benchmarks:
   
   ##### Before pivot fix #3800 
   
   ```
   Benchmark                                    Mode  Cnt       Score       
Error  Units
   GroupSortBenchmark.preSortedGroupSort       thrpt    3       6.278 ±     
0.149  ops/s
   GroupSortBenchmark.randomGroupSort          thrpt    3    1465.937 ±    
80.175  ops/s
   GroupSortBenchmark.reverseSortedGroupSort   thrpt    3       6.301 ±     
1.130  ops/s
   ```
   
   ##### After pivot fix #3800 
   
   ```
   Benchmark                                   Mode  Cnt       Score      Error 
 Units
   GroupSortBenchmark.preSortedGroupSort      thrpt    3    1978.380 ±  106.142 
 ops/s
   GroupSortBenchmark.randomGroupSort         thrpt    3    1172.314 ±   18.191 
 ops/s
   GroupSortBenchmark.reverseSortedGroupSort  thrpt    3    1958.383 ±   73.815 
 ops/s
   ```
   
   ##### After this set of changes
   
   ```
   Benchmark                                   Mode  Cnt     Score     Error  
Units
   GroupSortBenchmark.preSortedGroupSort      thrpt    3  8903.074 ± 270.220  
ops/s
   GroupSortBenchmark.randomGroupSort         thrpt    3  2105.925 ±  33.786  
ops/s
   GroupSortBenchmark.reverseSortedGroupSort  thrpt    3  8768.785 ± 162.558  
ops/s
   ```
   
   


-- 
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]

Reply via email to