文件名称:rust-smallvec:Rust的“小向量”优化
文件大小:35KB
文件格式:ZIP
更新时间:2024-05-22 15:06:37
Rust
锈小漆 Rust的“小向量”优化:在堆栈中最多存储少量项目 例子 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 acce
【文件预览】:
rust-smallvec-master
----.gitignore(38B)
----benches()
--------bench.rs(8KB)
----src()
--------specialization.rs(611B)
--------tests.rs(23KB)
--------lib.rs(59KB)
----.travis.yml(947B)
----fuzz()
--------travis-fuzz.sh(587B)
--------fuzz_targets()
--------Cargo.lock(8KB)
--------Cargo.toml(470B)
--------README.md(376B)
--------in()
----Cargo.toml(649B)
----LICENSE-MIT(1KB)
----scripts()
--------run_miri.sh(679B)
----README.md(649B)
----tests()
--------macro.rs(542B)
----LICENSE-APACHE(11KB)