Skip to content

Commit

Permalink
Sort benchmarks alphabetically by crate name
Browse files Browse the repository at this point in the history
  • Loading branch information
djkoloski committed Jul 3, 2023
1 parent 68cf3ad commit 4360c47
Showing 1 changed file with 43 additions and 43 deletions.
86 changes: 43 additions & 43 deletions benches/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,16 @@ fn bench_log(c: &mut Criterion) {
}
});

// Doesn't use a closure due to ICE in rustc. Probably related to https://github.com/rust-lang/rust/issues/86703
#[cfg(feature = "alkahest")]
bench_alkahest::bench(BENCH, c, &data, |data| {
for log in data.logs {
black_box(&log.address);
black_box(log.code);
black_box(log.size);
}
});

#[cfg(feature = "bincode")]
bench_bincode::bench(BENCH, c, &data);

Expand Down Expand Up @@ -102,6 +112,9 @@ fn bench_log(c: &mut Criterion) {
#[cfg(feature = "ciborium")]
bench_ciborium::bench(BENCH, c, &data);

#[cfg(feature = "dlhn")]
bench_dlhn::bench(BENCH, c, &data);

#[cfg(feature = "flatbuffers")]
bench_flatbuffers::bench(
BENCH,
Expand Down Expand Up @@ -135,6 +148,9 @@ fn bench_log(c: &mut Criterion) {
#[cfg(feature = "nachricht-serde")]
bench_nachricht_serde::bench(BENCH, c, &data);

#[cfg(feature = "scale")]
bench_parity_scale_codec::bench(BENCH, c, &data);

#[cfg(feature = "postcard")]
bench_postcard::bench(BENCH, c, &data);

Expand Down Expand Up @@ -176,9 +192,6 @@ fn bench_log(c: &mut Criterion) {
#[cfg(feature = "ron")]
bench_ron::bench(BENCH, c, &data);

#[cfg(feature = "scale")]
bench_parity_scale_codec::bench(BENCH, c, &data);

#[cfg(feature = "serde_bare")]
bench_serde_bare::bench(BENCH, c, &data);

Expand All @@ -193,19 +206,6 @@ fn bench_log(c: &mut Criterion) {

#[cfg(feature = "speedy")]
bench_speedy::bench(BENCH, c, &data);

// Doesn't use a closure due to ICE in rustc. Probably related to https://github.com/rust-lang/rust/issues/86703
#[cfg(feature = "alkahest")]
bench_alkahest::bench(BENCH, c, &data, |data| {
for log in data.logs {
black_box(&log.address);
black_box(log.code);
black_box(log.size);
}
});

#[cfg(feature = "dlhn")]
bench_dlhn::bench(BENCH, c, &data);
}

fn bench_mesh(c: &mut Criterion) {
Expand All @@ -231,6 +231,14 @@ fn bench_mesh(c: &mut Criterion) {
}
});

// Doesn't use a closure due to ICE in rustc. Probably related to https://github.com/rust-lang/rust/issues/86703
#[cfg(feature = "alkahest")]
bench_alkahest::bench(BENCH, c, &data, |mesh| {
for triangle in mesh.triangles {
black_box(&triangle.normal);
}
});

#[cfg(feature = "bincode")]
bench_bincode::bench(BENCH, c, &data);

Expand Down Expand Up @@ -258,6 +266,9 @@ fn bench_mesh(c: &mut Criterion) {
#[cfg(feature = "ciborium")]
bench_ciborium::bench(BENCH, c, &data);

#[cfg(feature = "dlhn")]
bench_dlhn::bench(BENCH, c, &data);

#[cfg(feature = "flatbuffers")]
bench_flatbuffers::bench(
BENCH,
Expand Down Expand Up @@ -287,6 +298,9 @@ fn bench_mesh(c: &mut Criterion) {
#[cfg(feature = "nachricht-serde")]
bench_nachricht_serde::bench(BENCH, c, &data);

#[cfg(feature = "scale")]
bench_parity_scale_codec::bench(BENCH, c, &data);

#[cfg(feature = "postcard")]
bench_postcard::bench(BENCH, c, &data);

Expand Down Expand Up @@ -319,9 +333,6 @@ fn bench_mesh(c: &mut Criterion) {
#[cfg(feature = "ron")]
bench_ron::bench(BENCH, c, &data);

#[cfg(feature = "scale")]
bench_parity_scale_codec::bench(BENCH, c, &data);

#[cfg(feature = "serde_bare")]
bench_serde_bare::bench(BENCH, c, &data);

Expand All @@ -336,17 +347,6 @@ fn bench_mesh(c: &mut Criterion) {

#[cfg(feature = "speedy")]
bench_speedy::bench(BENCH, c, &data);

// Doesn't use a closure due to ICE in rustc. Probably related to https://github.com/rust-lang/rust/issues/86703
#[cfg(feature = "alkahest")]
bench_alkahest::bench(BENCH, c, &data, |mesh| {
for triangle in mesh.triangles {
black_box(&triangle.normal);
}
});

#[cfg(feature = "dlhn")]
bench_dlhn::bench(BENCH, c, &data);
}

fn bench_minecraft_savedata(c: &mut Criterion) {
Expand All @@ -372,6 +372,13 @@ fn bench_minecraft_savedata(c: &mut Criterion) {
}
});

#[cfg(feature = "alkahest")]
bench_alkahest::bench(BENCH, c, &data, |data| {
for player in data.players {
black_box(&player.game_type);
}
});

#[cfg(feature = "bincode")]
bench_bincode::bench(BENCH, c, &data);

Expand Down Expand Up @@ -432,6 +439,9 @@ fn bench_minecraft_savedata(c: &mut Criterion) {
#[cfg(feature = "nachricht-serde")]
bench_nachricht_serde::bench(BENCH, c, &data);

#[cfg(feature = "scale")]
bench_parity_scale_codec::bench(BENCH, c, &data);

#[cfg(feature = "postcard")]
bench_postcard::bench(BENCH, c, &data);

Expand Down Expand Up @@ -467,9 +477,6 @@ fn bench_minecraft_savedata(c: &mut Criterion) {
#[cfg(feature = "ron")]
bench_ron::bench(BENCH, c, &data);

#[cfg(feature = "scale")]
bench_parity_scale_codec::bench(BENCH, c, &data);

#[cfg(feature = "serde_bare")]
bench_serde_bare::bench(BENCH, c, &data);

Expand All @@ -484,13 +491,6 @@ fn bench_minecraft_savedata(c: &mut Criterion) {

#[cfg(feature = "speedy")]
bench_speedy::bench(BENCH, c, &data);

#[cfg(feature = "alkahest")]
bench_alkahest::bench(BENCH, c, &data, |data| {
for player in data.players {
black_box(&player.game_type);
}
});
}

fn bench_mk48(c: &mut Criterion) {
Expand Down Expand Up @@ -581,6 +581,9 @@ fn bench_mk48(c: &mut Criterion) {
#[cfg(feature = "nachricht-serde")]
bench_nachricht_serde::bench(BENCH, c, &data);

#[cfg(feature = "scale")]
bench_parity_scale_codec::bench(BENCH, c, &data);

#[cfg(feature = "postcard")]
bench_postcard::bench(BENCH, c, &data);

Expand Down Expand Up @@ -611,9 +614,6 @@ fn bench_mk48(c: &mut Criterion) {
#[cfg(feature = "ron")]
bench_ron::bench(BENCH, c, &data);

#[cfg(feature = "scale")]
bench_parity_scale_codec::bench(BENCH, c, &data);

#[cfg(feature = "serde_bare")]
bench_serde_bare::bench(BENCH, c, &data);

Expand Down

0 comments on commit 4360c47

Please sign in to comment.