Skip to content

Commit

Permalink
Add benchmark comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
xStrom committed May 21, 2020
1 parent d327815 commit fb35901
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions druid/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ where
K: Eq + Hash + Copy,
V: Copy,
{
// Benchmarking this vs just extend+drain with a 10k entry map.
//
// running 2 tests
// test bench_extend ... bench: 1,971 ns/iter (+/- 566)
// test bench_extend_drain ... bench: 0 ns/iter (+/- 0)
fn extend_drain(&mut self, source: &mut Self) {
if !source.is_empty() {
if self.is_empty() {
Expand Down

0 comments on commit fb35901

Please sign in to comment.