tag | 177ddaf50eff83b96ec8afc1f66f8119efafdb92 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Wed Aug 31 06:47:21 2022 -0700 |
object | e7de6237ccf0873aea8c6580209056a875d1aaa6 |
t_frc_sta_330443010
commit | e7de6237ccf0873aea8c6580209056a875d1aaa6 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Apr 28 16:00:24 2022 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Apr 28 16:00:24 2022 +0000 |
tree | da86de748981dd96113865df11834b360d9da02b | |
parent | 871f09f27774e9ce2535322d6f4aa2fbd24ec053 [diff] | |
parent | 638d0ee87b2ef1082fe674e75f89932b179fe32a [diff] |
Snap for 8512216 from 638d0ee87b2ef1082fe674e75f89932b179fe32a to tm-frc-os-statsd-release Change-Id: Ia73b5e128e0ca6731cb3d6585365a6fb265384bd
“Small vector” optimization for Rust: store up to a small number of items on the stack
use smallvec::{SmallVec, smallvec}; // This SmallVec can hold up to 4 items on the stack: let mut v: SmallVec<[i32; 4]> = smallvec![1, 2, 3, 4]; // It will automatically move its contents to the heap if // contains more than four items: v.push(5); // SmallVec points to a slice, so you can use normal slice // indexing and other methods to access its contents: v[0] = v[1] + v[2]; v.sort();