| Crates.io | arc_vec |
| lib.rs | arc_vec |
| version | 0.1.2 |
| created_at | 2025-07-22 09:55:09.229196+00 |
| updated_at | 2025-07-25 10:04:58.316407+00 |
| description | Expensive but experimental project created for parallel execution. |
| homepage | |
| repository | https://github.com/YoungHaKim7/arc_vec |
| max_upload_size | |
| id | 1763335 |
| size | 423,174 |
Experimental work to run vectors in parallel
// Consider Arc<[T]> over Vec <T>
// Arc<[T]>
use arc_vec::alloc::arc_vec::ArcVec;
let my_num_arcvec_init: ArcVec<i32> = ArcVec::new();
[dependencies]
arc_vec = "0"
arcnewuse arc_vec::alloc::arc_vec::ArcVec;
fn main() {
let my_arc_vec = ArcVec::new();
my_arc_vec.push(10);
println!("arc_vec int push : {}", my_arc_vec);
}
use arc_vec::arc_vec;
fn main() {
let arc_test = arc_vec!(2);
println!("arc_vec : {}", arc_test);
}
cargo bench| rayon parallel_sort() |
vs | basic sort() |
|---|---|---|
![]() |
vs | ![]() |
| - | Estimate | - |
| 0.0162498 | R² | 0.0025004 |
| 17.870 ms | Mean | 27.310 ms |
| 267.86 µs | Std. Dev. | 176.25 µs |
| 17.818 ms | Median | 27.226 ms |
| 299.22 µs | MAD | 73.193 µs |
Understanding this report:
The plot on the left displays the average time per iteration for this benchmark. The shaded region shows the estimated probability of an iteration taking a certain amount of time, while the line shows the mean. Click on the plot for a larger view showing the outliers.
The plot on the right shows the linear regression calculated from the measurements. Each point represents a sample, though here it shows the total time for the sample rather than time per iteration. The line is the line of best fit for these measurements.
See the documentation for more details on the additional statistics.
$ cargo r --example sort_comparison
Array size: 1_000_000
Standard sort took: 511.425875ms
Parallel sort took: 2.315417ms
rustc --version --verbose$ rustc --version --verbose
rustc 1.88.0 (6b00bc388 2025-06-23)
binary: rustc
commit-hash: 6b00bc3880198600130e1cf62b8f8a93494488cc
commit-date: 2025-06-23
host: x86_64-unknown-linux-gnu
release: 1.88.0
LLVM version: 20.1.5
OS: Ubuntu 24.04.2 LTS x86_64
Kernel: Linux 6.14.0-24-generic
Shell: fish 3.7.1
DE: GNOME 46.0
WM: Mutter (X11)
Terminal: GNOME Terminal 3.52.0
CPU: 13th Gen Intel(R) Core(TM) i5-136z
GPU 1: NVIDIA GeForce RTX 3060 Ti Lite
GPU 2: Intel UHD Graphics 770 @ 1.55 G
Memory: 6.93 GiB / 94.09 GiB
This project is licensed under the MIT license.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in ArcVec by you, shall be licensed as MIT, without any additional terms or conditions.