Skip to content

Commit

Permalink
force-inline push_bytes; gets us on par with write_blob/old
Browse files Browse the repository at this point in the history
cs@devvm:[~/src/neon-work-2]: cargo bench -p utils --bench write_blob
    Finished bench [optimized + debuginfo] target(s) in 0.22s
     Running benches/write_blob.rs (target/release/deps/write_blob-f10f94bd2a09aa2a)
Gnuplot not found, using plotters backend
write_blob/old          time:   [17.859 ns 18.089 ns 18.279 ns]
Found 2 outliers among 100 measurements (2.00%)
  2 (2.00%) low severe
write_blob/pr-5004-writer
                        time:   [17.886 ns 18.040 ns 18.221 ns]
Found 4 outliers among 100 measurements (4.00%)
  1 (1.00%) low mild
  3 (3.00%) high mild
write_blob/pr-4994-nopagecache
                        time:   [6.5882 ns 6.6204 ns 6.6529 ns]
Found 8 outliers among 100 measurements (8.00%)
  8 (8.00%) high mild
  • Loading branch information
problame committed Aug 17, 2023
1 parent c47be4c commit 46a80a8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions libs/utils/benches/write_blob.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ mod pr5004 {
ephemeral_file,
})
}
#[inline(always)]
fn push_bytes(&mut self, src: &[u8]) -> Result<(), io::Error> {
let mut src_remaining = src;
while !src_remaining.is_empty() {
Expand Down
1 change: 1 addition & 0 deletions pageserver/src/tenant/ephemeral_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ impl BlobWriter for EphemeralFile {
ephemeral_file,
})
}
#[inline(always)]
fn push_bytes(&mut self, src: &[u8]) -> Result<(), io::Error> {
let mut src_remaining = src;
while !src_remaining.is_empty() {
Expand Down

0 comments on commit 46a80a8

Please sign in to comment.