Yes pls

Gesendet von Outlook für Android<https://aka.ms/AAb9ysg>
________________________________
From: Leo-Tinkeam (via GitHub) <[email protected]>
Sent: Sunday, 23 August 2026 16:13:01
To: [email protected] <[email protected]>
Subject: [PR] Rust: Use faster varint library [thrift]


Leo-Tinkeam opened a new pull request, #3739:
URL: https://github.com/apache/thrift/pull/3739

   Changed the Rust varint library from integer-encoding to varint-rs, my 
[tests](https://github.com/Leo-Tinkeam/bench-rust-varint) on differents library 
reveal that varint-rs can be up to 2 times faster.

   Also tested thrift before and after 
[here](https://github.com/Leo-Tinkeam/bench-thrift), 20% improvements in 
release mode (`cargo run --release`) but 60% slower with dev (`cargo run`). If 
this is an issue, I think that dev time don't matters but I'm not sure.

   The generated output.bin are exactly the same before and after (tested with 
`cmp master.bin before.bin`).

   I did not created a JIRA ticket, I may if it's mandatory.

   My usage is not the basic usage of the library, integer-encoding is using 
`write_all` once on `transport` but varint-rs is doing it for each byte, which 
is slower with our implementation of `transport.write_all`, I am writing to a 
buffer with varint-rs in order to use `write_all` only once at the end.

   I think that transport should use a fixed size buffer (something like 1ko ?) 
and the buffer that is up to 10o that I implemented here will became 
irrelevant. I'm not sure about this last observation but I may investigate if 
you want me to.



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