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

Build a benchmark to compare performance #5

Closed
Leeeon233 opened this issue Nov 7, 2022 · 1 comment
Closed

Build a benchmark to compare performance #5

Leeeon233 opened this issue Nov 7, 2022 · 1 comment
Assignees

Comments

@Leeeon233
Copy link
Member

candidate:

@Leeeon233
Copy link
Member Author

Leeeon233 commented Nov 8, 2022

For Test Data

#[columnar(vec)]
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
pub struct Data {
    #[columnar(strategy = "DeltaRle", original_type = "u64")]
    id: u64,
    name: String,
}

#[columnar]
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
pub struct VecStore {
    #[columnar(type = "vec")]
    pub data: Vec<Data>,
}

let mut _data = Vec::new();
for i in 0..10000 {
    _data.push(Data {
        id: i / 50,
        name: format!("name{}", i),
    });
}
VecStore { data: _data }
encode size (kb) encode time (µs)
columnar 87 1057.1
postcard 100 824.9
bincode 194 793.30

@Leeeon233 Leeeon233 self-assigned this Nov 8, 2022
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

No branches or pull requests

1 participant