[ 
https://issues.apache.org/jira/browse/THRIFT-6159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jens Geyer resolved THRIFT-6159.
--------------------------------
    Fix Version/s: 0.25.0
       Resolution: Fixed

Thanks!

> Rust: Use faster varint library - #3739
> ---------------------------------------
>
>                 Key: THRIFT-6159
>                 URL: https://issues.apache.org/jira/browse/THRIFT-6159
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Rust - Library
>    Affects Versions: 0.24.0
>            Reporter: Léo - Tinkeam
>            Assignee: Léo - Tinkeam
>            Priority: Minor
>             Fix For: 0.25.0
>
>   Original Estimate: 168h
>          Time Spent: 20m
>  Remaining Estimate: 167h 40m
>
> 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`). 
> This may be an issue but I think that dev time don't matters that much.
> The generated output.bin are exactly the same before and after (tested with 
> `cmp master.bin before.bin`).
> 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 message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to