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

Add simple benchmarks for in-/output handling #319

Merged
merged 1 commit into from
Jul 18, 2023

Conversation

monsterkrampe
Copy link
Member

related to #311

A quick idea for benchmarks for the logical input-/output mappings.

@monsterkrampe monsterkrampe added enhancement New feature or request logical logical layer tests Test related issues and pull requests labels Jul 17, 2023
@monsterkrampe monsterkrampe added this to the Release 0.4.0 milestone Jul 17, 2023
Comment on lines +108 to +135
serialized_output.bench_function("strings_in_logical_any", |b| {
b.iter_batched(
|| physical_strings.clone(),
|output| {
for _ in PrimitiveType::Any
.serialize_output(DataValueIteratorT::String(Box::new(output.into_iter())))
{
}
},
BatchSize::SmallInput,
)
});

serialized_output.bench_function("constants_in_logical_any", |b| {
b.iter_batched(
|| physical_constants.clone(),
|output| {
for _ in PrimitiveType::Any
.serialize_output(DataValueIteratorT::String(Box::new(output.into_iter())))
{
}
},
BatchSize::SmallInput,
)
});

serialized_output.finish();
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interestingly, out of these two the latter is noticeably faster. I did not investigate this too much but I would have expected them to have more or less the same performance.

@monsterkrampe monsterkrampe merged commit c36d2e6 into main Jul 18, 2023
@monsterkrampe monsterkrampe deleted the input-output-benchmarks branch July 18, 2023 05:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request logical logical layer tests Test related issues and pull requests
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants