-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
178 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
use crate::{bindings, Result}; | ||
|
||
#[derive(Debug)] | ||
pub(crate) struct Cache(pub(crate) bindings::CacheWrapper); | ||
|
||
impl Drop for Cache { | ||
fn drop(&mut self) { | ||
bindings::cache_release(*self.0); | ||
} | ||
} | ||
|
||
impl Cache { | ||
/// Create a new cache with the given capacity | ||
pub fn new(capacity: usize) -> Result<Cache> { | ||
let cache = bindings::CacheWrapper(bindings::cache_create(capacity)?); | ||
Ok(Cache(cache)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
803f6e5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
openslide-rs Benchmark
deepzoom_read_image_256
1173545
ns/iter (± 6896
)1171932
ns/iter (± 10596
)1.00
deepzoom_read_image_256_arc
1172990
ns/iter (± 50788
)1173551
ns/iter (± 11095
)1.00
deepzoom_read_image_512
4701604
ns/iter (± 40618
)4701862
ns/iter (± 28691
)1.00
deepzoom_read_image_512_arc
4717565
ns/iter (± 392903
)4700822
ns/iter (± 27526
)1.00
openslide_read_image_256
1137509
ns/iter (± 15691
)1135693
ns/iter (± 9663
)1.00
openslide_read_image_512
4726024
ns/iter (± 269493
)4715786
ns/iter (± 48427
)1.00
openslide_read_region_256
1084990
ns/iter (± 11702
)1085155
ns/iter (± 4602
)1.00
openslide_read_region_512
4510669
ns/iter (± 23880
)4509799
ns/iter (± 66607
)1.00
This comment was automatically generated by workflow using github-action-benchmark.