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

   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.
   
   This one is 1 of 3 PRs
   ---
   
   Add a bytes-based fastbinary decode entry point so callers that already hold 
serialized thrift data can bypass TMemoryBuffer and protocol wrapper setup 
while reusing the existing struct decoder.
   
   Performance (50k iterations, warmed)
   
   | Workload | decode_binary (transport) | decode_binary_from_bytes | Speedup |
   |----------|---------------------------|--------------------------|---------|
   | simple (30B) | 3.59 us | 0.81 us | 4.43x |
   | 10-string (182B) | 9.52 us | 6.77 us | 1.41x |
   | complex (395B) | 12.03 us | 8.26 us | 1.46x |
   
   The transport overhead (TMemoryBuffer + TBinaryProtocolAccelerated + 
BytesIO) is a fixed ~2.6us per call. For small structs this dominates; for 
larger structs the per-field decode work catches up.


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