anuraaga opened a new pull request #2582: Reuse char[] buffer when decoding hex 
fields.
URL: https://github.com/apache/incubator-zipkin/pull/2582
 
 
   Very low hanging fruit to cut out a bit of time and lots of allocation from 
proto decoding across the board.
   
   After
   ```
   
   Benchmark                                                                    
Mode    Cnt        Score        Error   Units
   ProtoCodecBenchmarks.bytes_zipkinDecoder                                   
sample  13944     1075.996 ±      5.424   us/op
   ProtoCodecBenchmarks.bytes_zipkinDecoder:bytes_zipkinDecoder·p0.00         
sample             946.176                us/op
   ProtoCodecBenchmarks.bytes_zipkinDecoder:bytes_zipkinDecoder·p0.50         
sample            1035.264                us/op
   ProtoCodecBenchmarks.bytes_zipkinDecoder:bytes_zipkinDecoder·p0.90         
sample            1206.272                us/op
   ProtoCodecBenchmarks.bytes_zipkinDecoder:bytes_zipkinDecoder·p0.95         
sample            1300.480                us/op
   ProtoCodecBenchmarks.bytes_zipkinDecoder:bytes_zipkinDecoder·p0.99         
sample            1905.971                us/op
   ProtoCodecBenchmarks.bytes_zipkinDecoder:bytes_zipkinDecoder·p0.999        
sample            2646.241                us/op
   ProtoCodecBenchmarks.bytes_zipkinDecoder:bytes_zipkinDecoder·p0.9999       
sample            9064.374                us/op
   ProtoCodecBenchmarks.bytes_zipkinDecoder:bytes_zipkinDecoder·p1.00         
sample           12173.312                us/op
   ProtoCodecBenchmarks.bytes_zipkinDecoder:·gc.alloc.rate                    
sample     15     1127.734 ±     19.652  MB/sec
   ProtoCodecBenchmarks.bytes_zipkinDecoder:·gc.alloc.rate.norm               
sample     15  1911162.365 ±     18.035    B/op
   ProtoCodecBenchmarks.bytes_zipkinDecoder:·gc.churn.G1_Eden_Space           
sample     15     1129.688 ±     63.861  MB/sec
   ProtoCodecBenchmarks.bytes_zipkinDecoder:·gc.churn.G1_Eden_Space.norm      
sample     15  1914777.841 ± 110248.824    B/op
   ProtoCodecBenchmarks.bytes_zipkinDecoder:·gc.churn.G1_Old_Gen              
sample     15        1.437 ±      0.248  MB/sec
   ProtoCodecBenchmarks.bytes_zipkinDecoder:·gc.churn.G1_Old_Gen.norm         
sample     15     2432.063 ±    404.121    B/op
   ProtoCodecBenchmarks.bytes_zipkinDecoder:·gc.churn.G1_Survivor_Space       
sample     15        1.287 ±      0.326  MB/sec
   ProtoCodecBenchmarks.bytes_zipkinDecoder:·gc.churn.G1_Survivor_Space.norm  
sample     15     2184.517 ±    582.806    B/op
   ProtoCodecBenchmarks.bytes_zipkinDecoder:·gc.count                         
sample     15      117.000               counts
   ProtoCodecBenchmarks.bytes_zipkinDecoder:·gc.time                          
sample     15      110.000                   ms
   ```
   
   Before
   ```
   Benchmark                                                                    
Mode    Cnt        Score        Error   Units
   ProtoCodecBenchmarks.bytes_zipkinDecoder                                   
sample  13504     1110.811 ±      5.541   us/op
   ProtoCodecBenchmarks.bytes_zipkinDecoder:bytes_zipkinDecoder·p0.00         
sample             942.080                us/op
   ProtoCodecBenchmarks.bytes_zipkinDecoder:bytes_zipkinDecoder·p0.50         
sample            1060.864                us/op
   ProtoCodecBenchmarks.bytes_zipkinDecoder:bytes_zipkinDecoder·p0.90         
sample            1269.760                us/op
   ProtoCodecBenchmarks.bytes_zipkinDecoder:bytes_zipkinDecoder·p0.95         
sample            1376.256                us/op
   ProtoCodecBenchmarks.bytes_zipkinDecoder:bytes_zipkinDecoder·p0.99         
sample            2080.154                us/op
   ProtoCodecBenchmarks.bytes_zipkinDecoder:bytes_zipkinDecoder·p0.999        
sample            2699.264                us/op
   ProtoCodecBenchmarks.bytes_zipkinDecoder:bytes_zipkinDecoder·p0.9999       
sample            5006.438                us/op
   ProtoCodecBenchmarks.bytes_zipkinDecoder:bytes_zipkinDecoder·p1.00         
sample            5652.480                us/op
   ProtoCodecBenchmarks.bytes_zipkinDecoder:·gc.alloc.rate                    
sample     15     1192.757 ±     75.891  MB/sec
   ProtoCodecBenchmarks.bytes_zipkinDecoder:·gc.alloc.rate.norm               
sample     15  2087164.817 ±     22.574    B/op
   ProtoCodecBenchmarks.bytes_zipkinDecoder:·gc.churn.G1_Eden_Space           
sample     15     1189.685 ±     95.704  MB/sec
   ProtoCodecBenchmarks.bytes_zipkinDecoder:·gc.churn.G1_Eden_Space.norm      
sample     15  2081750.627 ± 103259.490    B/op
   ProtoCodecBenchmarks.bytes_zipkinDecoder:·gc.churn.G1_Old_Gen              
sample     15        1.142 ±      0.611  MB/sec
   ProtoCodecBenchmarks.bytes_zipkinDecoder:·gc.churn.G1_Old_Gen.norm         
sample     15     2024.829 ±   1101.138    B/op
   ProtoCodecBenchmarks.bytes_zipkinDecoder:·gc.churn.G1_Survivor_Space       
sample     15        1.553 ±      0.581  MB/sec
   ProtoCodecBenchmarks.bytes_zipkinDecoder:·gc.churn.G1_Survivor_Space.norm  
sample     15     2735.052 ±   1038.158    B/op
   ProtoCodecBenchmarks.bytes_zipkinDecoder:·gc.count                         
sample     15      116.000               counts
   ProtoCodecBenchmarks.bytes_zipkinDecoder:·gc.time                          
sample     15      110.000                   ms
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to