Skip to content

Commit 3639c16

Browse files
committed
original_tiny_1.5x_growth_otherwise
1 parent 42e751a commit 3639c16

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/liballoc/raw_vec.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,10 +236,10 @@ fn amortized_new_capacity(elem_size: usize, current_capacity: usize,
236236
// c if c > 4096 * 32 / elem_size => 2 * c,
237237

238238
// Medium sized vectors in the [4096, 4096 * 32) bytes range:
239-
// c => c / 2 * 3,
239+
c => c / 2 * 3 + 1,
240240

241241
// [Original]
242-
c => 2 * c,
242+
// c => 2 * c,
243243
};
244244
cmp::max(growth_capacity,
245245
current_capacity.checked_add(capacity_increase).unwrap())

0 commit comments

Comments
 (0)