markjm opened a new pull request, #3596:
URL: https://github.com/apache/thrift/pull/3596

   Hi - I figured I'd share a few perf optimizations we are using internally. 
We are still on an older thrift version (😢 ), so I did use some agent magic to 
port these to the head of this repo. My testing was primarily on my branch, so 
buyer beware on that front!
   
   This one is 1 of 3 PRs
   
   ---
   
   Replace std::vector back_inserter writes in the fastbinary encoder with a 
malloc/realloc buffer so encoded bytes can be copied in bulk while preserving 
the existing growth behavior.
   
   Performance (50k iterations, warmed)
   
   | Message size | apache/master | branch | speedup |
   |--------------|---------------|--------|---------|
   | 8 KiB | 12.19 us | 1.11 us | 11.0x |
   | 64 KiB | 101.58 us | 5.48 us | 18.5x |
   | 256 KiB | 564.34 us | 25.22 us | 22.4x |
   | 1 MiB | 2188.97 us | 136.22 us | 16.1x |
   
   Decode performance is unchanged because this only affects the encode path.
   
   


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