Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat] derive serde for proving key #7

Closed
wants to merge 4 commits into from
Closed

Conversation

jonathanpwang
Copy link
Collaborator

@jonathanpwang jonathanpwang commented Jul 27, 2023

Macbook Pro M1Max

cargo run --example serialization

k: 22, extended_k: 23

buf_size: 1024 (1kb)
SerdeFormat::RawBytes pk write time: 9.442123375s
SerdeFormat::RawBytes pk read time: 3.664672958s
The size of the file is 5100274316 bytes

bincode pk write time: 12.883031s
bincode pk read time: 4.773148791s
The size of the file is 5905587221 bytes


buf_size: 8192 (8kb)
SerdeFormat::RawBytes pk write time: 3.030109958s
SerdeFormat::RawBytes pk read time: 1.883050208s
The size of the file is 5100274316 bytes

bincode pk write time: 3.30306475s
bincode pk read time: 2.689354458s
The size of the file is 5905587221 bytes


buf_size: 1048576 (1mb)
SerdeFormat::RawBytes pk write time: 1.6365095s
SerdeFormat::RawBytes pk read time: 1.566943458s
The size of the file is 5100274316 bytes

bincode pk write time: 1.590803833s
bincode pk read time: 2.351837791s
The size of the file is 5905587221 bytes


buf_size: 1073741824 (1gb)
SerdeFormat::RawBytes pk write time: 1.634263541s
SerdeFormat::RawBytes pk read time: 1.665291291s
The size of the file is 5100274316 bytes

bincode pk write time: 1.760522083s
bincode pk read time: 2.485505916s
The size of the file is 5905587221 bytes

Ubuntu c6a.metal

k: 22, extended_k: 23
buf_size: 1024
SerdeFormat::RawBytes pk write time: 7.181348219s
SerdeFormat::RawBytes pk read time: 3.243197832s
The size of the file is 5100274316 bytes
bincode pk write time: 8.273701355s
bincode pk read time: 4.67558756s
The size of the file is 5905587221 bytes
buf_size: 8192
SerdeFormat::RawBytes pk write time: 3.791338683s
SerdeFormat::RawBytes pk read time: 2.309466145s
The size of the file is 5100274316 bytes
bincode pk write time: 3.704418194s
bincode pk read time: 3.729152971s
The size of the file is 5905587221 bytes
buf_size: 1048576
SerdeFormat::RawBytes pk write time: 3.30082691s
SerdeFormat::RawBytes pk read time: 2.106349607s
The size of the file is 5100274316 bytes
bincode pk write time: 2.783368942s
bincode pk read time: 3.58548298s
The size of the file is 5905587221 bytes
buf_size: 1073741824
SerdeFormat::RawBytes pk write time: 3.81766919s
SerdeFormat::RawBytes pk read time: 3.696294414s
The size of the file is 5100274316 bytes
bincode pk write time: 3.332019878s
bincode pk read time: 5.48401095s
The size of the file is 5905587221 bytes

BufReader::new default buffer size is only 8kb! https://doc.rust-lang.org/std/io/struct.BufReader.html

Todo:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant