You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that sorting String values is much faster than sorting the same values represented a Vec<u8>. I expected the second case to be faster. Is there an easy explanation?
The text was updated successfully, but these errors were encountered:
First, thank you for the prompt answer! You must be a little patient with me because I have a lot of experience in other languages but this is, well, my first Rust program.
It takes a directory with a number of large TSVs (the motivation was BlockChair files with cryptocurrency transitions), cuts some fields and sorts the result. There is an u8-vector (src/bin/u8.rs) version and a string (src/bin/string.rs) version. The u8 version uses ByteLines to read directly vectors of bytes. https://github.com/vigna/blockchair-sort/
You run it by passing the directory where the files are present and the list of fields. For example,
./target/release/u8 testoutputs 2 5
where testoutputs contains TSVs.
The u8 program is eight times slower than the string program on the same data and I'm really puzzled.
I noticed that sorting
String
values is much faster than sorting the same values represented aVec<u8>
. I expected the second case to be faster. Is there an easy explanation?The text was updated successfully, but these errors were encountered: